├── .gitignore ├── CODE_OF_CONDUCT.md ├── LICENSE ├── NOTICES.txt ├── NtApiDotNet.dll ├── PipeViewer.sln ├── PipeViewer ├── App.config ├── ColumnSelection.Designer.cs ├── ColumnSelection.cs ├── ColumnSelection.resx ├── Control │ └── Engine.cs ├── Form1.Designer.cs ├── Form1.cs ├── Form1.resx ├── FormAbout.Designer.cs ├── FormAbout.cs ├── FormAbout.resx ├── FormColumnFilter.Designer.cs ├── FormColumnFilter.cs ├── FormColumnFilter.resx ├── FormHighlighting.Designer.cs ├── FormHighlighting.cs ├── FormHighlighting.resx ├── FormPipeProperties.Designer.cs ├── FormPipeProperties.cs ├── FormPipeProperties.resx ├── FormSearch.Designer.cs ├── FormSearch.cs ├── PermissionDialog.cs ├── PipeChat.Designer.cs ├── PipeChat.cs ├── PipeChat.resx ├── PipeViewer.csproj ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── ResizableTextBoxControl.resx ├── Resources │ ├── Info.png │ ├── Lock.png │ ├── User-icon-256-blue.png │ ├── connected.png │ ├── csv_export.png │ ├── eraser.png │ ├── export.png │ ├── filter.png │ ├── find.png │ ├── grid-disable.png │ ├── grid.png │ ├── group-icon.jpg │ ├── highlighter.png │ ├── import.png │ ├── left-arrow.png │ ├── link.png │ ├── loading.bmp │ ├── loading.png │ ├── no-connection.png │ ├── permission-disable.png │ ├── permission.png │ ├── pipeviewer_logo.ico │ ├── recieve.png │ ├── refresh.png │ ├── right-arrow.png │ ├── search (2).png │ ├── send (2).png │ ├── send.png │ ├── startIcon.png │ ├── unlinked-custom.png │ ├── userIcon.bmp │ └── user_icon.ico ├── Utils.cs └── packages.config ├── PipeViewerShellV1.0.ps1 ├── README.md ├── Tests ├── NamedPipeServer.ps1 └── OLDNamedPipeServer.ps1 └── packages └── Be.Windows.Forms.HexBox.1.6.1 ├── Be.Windows.Forms.HexBox.1.6.1.nupkg ├── LICENSE.txt └── lib └── net40 ├── Be.Windows.Forms.HexBox.dll └── Be.Windows.Forms.HexBox.xml /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | ### Csharp ### 3 | ## Ignore Visual Studio temporary files, build results, and 4 | ## files generated by popular Visual Studio add-ons. 5 | ## 6 | ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore 7 | 8 | # User-specific files 9 | *.rsuser 10 | *.suo 11 | *.user 12 | *.userosscache 13 | *.sln.docstates 14 | 15 | # User-specific files (MonoDevelop/Xamarin Studio) 16 | *.userprefs 17 | 18 | # Mono auto generated files 19 | mono_crash.* 20 | 21 | # Build results 22 | [Dd]ebug/ 23 | [Dd]ebugPublic/ 24 | [Rr]elease/ 25 | [Rr]eleases/ 26 | x64/ 27 | x86/ 28 | [Ww][Ii][Nn]32/ 29 | [Aa][Rr][Mm]/ 30 | [Aa][Rr][Mm]64/ 31 | bld/ 32 | [Bb]in/ 33 | [Oo]bj/ 34 | [Ll]og/ 35 | [Ll]ogs/ 36 | 37 | # Visual Studio 2015/2017 cache/options directory 38 | .vs/ 39 | # Uncomment if you have tasks that create the project's static files in wwwroot 40 | #wwwroot/ 41 | 42 | # Visual Studio 2017 auto generated files 43 | Generated\ Files/ 44 | 45 | # MSTest test Results 46 | [Tt]est[Rr]esult*/ 47 | [Bb]uild[Ll]og.* 48 | 49 | # NUnit 50 | *.VisualState.xml 51 | TestResult.xml 52 | nunit-*.xml 53 | 54 | # Build Results of an ATL Project 55 | [Dd]ebugPS/ 56 | [Rr]eleasePS/ 57 | dlldata.c 58 | 59 | # Benchmark Results 60 | BenchmarkDotNet.Artifacts/ 61 | 62 | # .NET Core 63 | project.lock.json 64 | project.fragment.lock.json 65 | artifacts/ 66 | 67 | # ASP.NET Scaffolding 68 | ScaffoldingReadMe.txt 69 | 70 | # StyleCop 71 | StyleCopReport.xml 72 | 73 | # Files built by Visual Studio 74 | *_i.c 75 | *_p.c 76 | *_h.h 77 | *.ilk 78 | *.meta 79 | *.obj 80 | *.iobj 81 | *.pch 82 | *.pdb 83 | *.ipdb 84 | *.pgc 85 | *.pgd 86 | *.rsp 87 | *.sbr 88 | *.tlb 89 | *.tli 90 | *.tlh 91 | *.tmp 92 | *.tmp_proj 93 | *_wpftmp.csproj 94 | *.log 95 | *.tlog 96 | *.vspscc 97 | *.vssscc 98 | .builds 99 | *.pidb 100 | *.svclog 101 | *.scc 102 | 103 | # Chutzpah Test files 104 | _Chutzpah* 105 | 106 | # Visual C++ cache files 107 | ipch/ 108 | *.aps 109 | *.ncb 110 | *.opendb 111 | *.opensdf 112 | *.sdf 113 | *.cachefile 114 | *.VC.db 115 | *.VC.VC.opendb 116 | 117 | # Visual Studio profiler 118 | *.psess 119 | *.vsp 120 | *.vspx 121 | *.sap 122 | 123 | # Visual Studio Trace Files 124 | *.e2e 125 | 126 | # TFS 2012 Local Workspace 127 | $tf/ 128 | 129 | # Guidance Automation Toolkit 130 | *.gpState 131 | 132 | # ReSharper is a .NET coding add-in 133 | _ReSharper*/ 134 | *.[Rr]e[Ss]harper 135 | *.DotSettings.user 136 | 137 | # TeamCity is a build add-in 138 | _TeamCity* 139 | 140 | # DotCover is a Code Coverage Tool 141 | *.dotCover 142 | 143 | # AxoCover is a Code Coverage Tool 144 | .axoCover/* 145 | !.axoCover/settings.json 146 | 147 | # Coverlet is a free, cross platform Code Coverage Tool 148 | coverage*.json 149 | coverage*.xml 150 | coverage*.info 151 | 152 | # Visual Studio code coverage results 153 | *.coverage 154 | *.coveragexml 155 | 156 | # NCrunch 157 | _NCrunch_* 158 | .*crunch*.local.xml 159 | nCrunchTemp_* 160 | 161 | # MightyMoose 162 | *.mm.* 163 | AutoTest.Net/ 164 | 165 | # Web workbench (sass) 166 | .sass-cache/ 167 | 168 | # Installshield output folder 169 | [Ee]xpress/ 170 | 171 | # DocProject is a documentation generator add-in 172 | DocProject/buildhelp/ 173 | DocProject/Help/*.HxT 174 | DocProject/Help/*.HxC 175 | DocProject/Help/*.hhc 176 | DocProject/Help/*.hhk 177 | DocProject/Help/*.hhp 178 | DocProject/Help/Html2 179 | DocProject/Help/html 180 | 181 | # Click-Once directory 182 | publish/ 183 | 184 | # Publish Web Output 185 | *.[Pp]ublish.xml 186 | *.azurePubxml 187 | # Note: Comment the next line if you want to checkin your web deploy settings, 188 | # but database connection strings (with potential passwords) will be unencrypted 189 | *.pubxml 190 | *.publishproj 191 | 192 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 193 | # checkin your Azure Web App publish settings, but sensitive information contained 194 | # in these scripts will be unencrypted 195 | PublishScripts/ 196 | 197 | # NuGet Packages 198 | *.nupkg 199 | # NuGet Symbol Packages 200 | *.snupkg 201 | # The packages folder can be ignored because of Package Restore 202 | **/[Pp]ackages/* 203 | # except build/, which is used as an MSBuild target. 204 | !**/[Pp]ackages/build/ 205 | # Uncomment if necessary however generally it will be regenerated when needed 206 | #!**/[Pp]ackages/repositories.config 207 | # NuGet v3's project.json files produces more ignorable files 208 | *.nuget.props 209 | *.nuget.targets 210 | 211 | # Microsoft Azure Build Output 212 | csx/ 213 | *.build.csdef 214 | 215 | # Microsoft Azure Emulator 216 | ecf/ 217 | rcf/ 218 | 219 | # Windows Store app package directories and files 220 | AppPackages/ 221 | BundleArtifacts/ 222 | Package.StoreAssociation.xml 223 | _pkginfo.txt 224 | *.appx 225 | *.appxbundle 226 | *.appxupload 227 | 228 | # Visual Studio cache files 229 | # files ending in .cache can be ignored 230 | *.[Cc]ache 231 | # but keep track of directories ending in .cache 232 | !?*.[Cc]ache/ 233 | 234 | # Others 235 | ClientBin/ 236 | ~$* 237 | *~ 238 | *.dbmdl 239 | *.dbproj.schemaview 240 | *.jfm 241 | *.pfx 242 | *.publishsettings 243 | orleans.codegen.cs 244 | 245 | # Including strong name files can present a security risk 246 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 247 | #*.snk 248 | 249 | # Since there are multiple workflows, uncomment next line to ignore bower_components 250 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 251 | #bower_components/ 252 | 253 | # RIA/Silverlight projects 254 | Generated_Code/ 255 | 256 | # Backup & report files from converting an old project file 257 | # to a newer Visual Studio version. Backup files are not needed, 258 | # because we have git ;-) 259 | _UpgradeReport_Files/ 260 | Backup*/ 261 | UpgradeLog*.XML 262 | UpgradeLog*.htm 263 | ServiceFabricBackup/ 264 | *.rptproj.bak 265 | 266 | # SQL Server files 267 | *.mdf 268 | *.ldf 269 | *.ndf 270 | 271 | # Business Intelligence projects 272 | *.rdl.data 273 | *.bim.layout 274 | *.bim_*.settings 275 | *.rptproj.rsuser 276 | *- [Bb]ackup.rdl 277 | *- [Bb]ackup ([0-9]).rdl 278 | *- [Bb]ackup ([0-9][0-9]).rdl 279 | 280 | # Microsoft Fakes 281 | FakesAssemblies/ 282 | 283 | # GhostDoc plugin setting file 284 | *.GhostDoc.xml 285 | 286 | # Node.js Tools for Visual Studio 287 | .ntvs_analysis.dat 288 | node_modules/ 289 | 290 | # Visual Studio 6 build log 291 | *.plg 292 | 293 | # Visual Studio 6 workspace options file 294 | *.opt 295 | 296 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 297 | *.vbw 298 | 299 | # Visual Studio 6 auto-generated project file (contains which files were open etc.) 300 | *.vbp 301 | 302 | # Visual Studio 6 workspace and project file (working project files containing files to include in project) 303 | *.dsw 304 | *.dsp 305 | 306 | # Visual Studio 6 technical files 307 | 308 | # Visual Studio LightSwitch build output 309 | **/*.HTMLClient/GeneratedArtifacts 310 | **/*.DesktopClient/GeneratedArtifacts 311 | **/*.DesktopClient/ModelManifest.xml 312 | **/*.Server/GeneratedArtifacts 313 | **/*.Server/ModelManifest.xml 314 | _Pvt_Extensions 315 | 316 | # Paket dependency manager 317 | .paket/paket.exe 318 | paket-files/ 319 | 320 | # FAKE - F# Make 321 | .fake/ 322 | 323 | # CodeRush personal settings 324 | .cr/personal 325 | 326 | # Python Tools for Visual Studio (PTVS) 327 | __pycache__/ 328 | *.pyc 329 | 330 | # Cake - Uncomment if you are using it 331 | # tools/** 332 | # !tools/packages.config 333 | 334 | # Tabs Studio 335 | *.tss 336 | 337 | # Telerik's JustMock configuration file 338 | *.jmconfig 339 | 340 | # BizTalk build output 341 | *.btp.cs 342 | *.btm.cs 343 | *.odx.cs 344 | *.xsd.cs 345 | 346 | # OpenCover UI analysis results 347 | OpenCover/ 348 | 349 | # Azure Stream Analytics local run output 350 | ASALocalRun/ 351 | 352 | # MSBuild Binary and Structured Log 353 | *.binlog 354 | 355 | # NVidia Nsight GPU debugger configuration file 356 | *.nvuser 357 | 358 | # MFractors (Xamarin productivity tool) working folder 359 | .mfractor/ 360 | 361 | # Local History for Visual Studio 362 | .localhistory/ 363 | 364 | # Visual Studio History (VSHistory) files 365 | .vshistory/ 366 | 367 | # BeatPulse healthcheck temp database 368 | healthchecksdb 369 | 370 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 371 | MigrationBackup/ 372 | 373 | # Ionide (cross platform F# VS Code tools) working folder 374 | .ionide/ 375 | 376 | # Fody - auto-generated XML schema 377 | FodyWeavers.xsd 378 | 379 | # VS Code files for those working on multiple tools 380 | .vscode/* 381 | !.vscode/settings.json 382 | !.vscode/tasks.json 383 | !.vscode/launch.json 384 | !.vscode/extensions.json 385 | *.code-workspace 386 | 387 | # Local History for Visual Studio Code 388 | .history/ 389 | 390 | # Windows Installer files from build outputs 391 | *.cab 392 | *.msi 393 | *.msix 394 | *.msm 395 | *.msp 396 | 397 | # JetBrains Rider 398 | *.sln.iml 399 | 400 | ### VisualStudio ### 401 | 402 | # User-specific files 403 | 404 | # User-specific files (MonoDevelop/Xamarin Studio) 405 | 406 | # Mono auto generated files 407 | 408 | # Build results 409 | 410 | # Visual Studio 2015/2017 cache/options directory 411 | # Uncomment if you have tasks that create the project's static files in wwwroot 412 | 413 | # Visual Studio 2017 auto generated files 414 | 415 | # MSTest test Results 416 | 417 | # NUnit 418 | 419 | # Build Results of an ATL Project 420 | 421 | # Benchmark Results 422 | 423 | # .NET Core 424 | 425 | # ASP.NET Scaffolding 426 | 427 | # StyleCop 428 | 429 | # Files built by Visual Studio 430 | 431 | # Chutzpah Test files 432 | 433 | # Visual C++ cache files 434 | 435 | # Visual Studio profiler 436 | 437 | # Visual Studio Trace Files 438 | 439 | # TFS 2012 Local Workspace 440 | 441 | # Guidance Automation Toolkit 442 | 443 | # ReSharper is a .NET coding add-in 444 | 445 | # TeamCity is a build add-in 446 | 447 | # DotCover is a Code Coverage Tool 448 | 449 | # AxoCover is a Code Coverage Tool 450 | 451 | # Coverlet is a free, cross platform Code Coverage Tool 452 | 453 | # Visual Studio code coverage results 454 | 455 | # NCrunch 456 | 457 | # MightyMoose 458 | 459 | # Web workbench (sass) 460 | 461 | # Installshield output folder 462 | 463 | # DocProject is a documentation generator add-in 464 | 465 | # Click-Once directory 466 | 467 | # Publish Web Output 468 | # Note: Comment the next line if you want to checkin your web deploy settings, 469 | # but database connection strings (with potential passwords) will be unencrypted 470 | 471 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 472 | # checkin your Azure Web App publish settings, but sensitive information contained 473 | # in these scripts will be unencrypted 474 | 475 | # NuGet Packages 476 | # NuGet Symbol Packages 477 | # The packages folder can be ignored because of Package Restore 478 | # except build/, which is used as an MSBuild target. 479 | # Uncomment if necessary however generally it will be regenerated when needed 480 | # NuGet v3's project.json files produces more ignorable files 481 | 482 | # Microsoft Azure Build Output 483 | 484 | # Microsoft Azure Emulator 485 | 486 | # Windows Store app package directories and files 487 | 488 | # Visual Studio cache files 489 | # files ending in .cache can be ignored 490 | # but keep track of directories ending in .cache 491 | 492 | # Others 493 | 494 | # Including strong name files can present a security risk 495 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 496 | 497 | # Since there are multiple workflows, uncomment next line to ignore bower_components 498 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 499 | 500 | # RIA/Silverlight projects 501 | 502 | # Backup & report files from converting an old project file 503 | # to a newer Visual Studio version. Backup files are not needed, 504 | # because we have git ;-) 505 | 506 | # SQL Server files 507 | 508 | # Business Intelligence projects 509 | 510 | # Microsoft Fakes 511 | 512 | # GhostDoc plugin setting file 513 | 514 | # Node.js Tools for Visual Studio 515 | 516 | # Visual Studio 6 build log 517 | 518 | # Visual Studio 6 workspace options file 519 | 520 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 521 | 522 | # Visual Studio 6 auto-generated project file (contains which files were open etc.) 523 | 524 | # Visual Studio 6 workspace and project file (working project files containing files to include in project) 525 | 526 | # Visual Studio 6 technical files 527 | 528 | # Visual Studio LightSwitch build output 529 | 530 | # Paket dependency manager 531 | 532 | # FAKE - F# Make 533 | 534 | # CodeRush personal settings 535 | 536 | # Python Tools for Visual Studio (PTVS) 537 | 538 | # Cake - Uncomment if you are using it 539 | # tools/** 540 | # !tools/packages.config 541 | 542 | # Tabs Studio 543 | 544 | # Telerik's JustMock configuration file 545 | 546 | # BizTalk build output 547 | 548 | # OpenCover UI analysis results 549 | 550 | # Azure Stream Analytics local run output 551 | 552 | # MSBuild Binary and Structured Log 553 | 554 | # NVidia Nsight GPU debugger configuration file 555 | 556 | # MFractors (Xamarin productivity tool) working folder 557 | 558 | # Local History for Visual Studio 559 | 560 | # Visual Studio History (VSHistory) files 561 | 562 | # BeatPulse healthcheck temp database 563 | 564 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 565 | 566 | # Ionide (cross platform F# VS Code tools) working folder 567 | 568 | # Fody - auto-generated XML schema 569 | 570 | # VS Code files for those working on multiple tools 571 | 572 | # Local History for Visual Studio Code 573 | 574 | # Windows Installer files from build outputs 575 | 576 | # JetBrains Rider 577 | 578 | ### VisualStudio Patch ### 579 | # Additional files built by Visual Studio -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # CyberArk Community Code of Conduct 2 | 3 | CyberArk is a leader in Privileged Access Management, thanks to its customers and community. We listen to our community and wish to provide additional relevant tools. We believe that our mission is best served in an environment that is friendly, safe, and accepting; free from intimidation or harassment. 4 | Towards this end, CyberArk’s developers have created this Community Code of Conduct for the CyberArk open source community. Our Code of Conduct sets the standard for how developers, and community members can work together in a respectful and collaborative manner. Those who do not abide by this Code of Conduct will not be permitted to remain part of our community. 5 | 6 | 7 | ## Summary of Key Principles 8 | 9 | - Be respectful to others in the community at all times. 10 | - Report harassing or abusive behavior that you experience or witness at ReportAbuse@cyberark.com 11 | - The CyberArk community will not tolerate abusive or disrespectful behavior towards its members; anyone engaging in such behavior will be suspended from the CyberArk community. 12 | 13 | 14 | ## Scope 15 | 16 | This Code of Conduct applies to all members of the CyberArk community, including paid and unpaid agents, administrators, users, and customers of CyberArk. It applies in all CyberArk community venues, online and in person, including CyberArk Open Source project communities (such as public GitHub repositories, chat channels, social media, mailing lists, and public events) and in one-on-one communications pertaining to CyberArk affairs. 17 | This policy covers the usage of CyberArk hosted services, as well as the CyberArk website, CyberArk related events, and any other services offered by or on behalf of CyberArk (collectively, the "Service"). 18 | This Code of Conduct is in addition to, and does not in any way nullify or invalidate, any other terms or conditions related to use of the Service. 19 | 20 | 21 | ## Maintaining a Friendly, Harassment-Free Space 22 | 23 | We are committed to providing a friendly, safe and welcoming environment for all, regardless of gender identity, sexual orientation, ability, ethnicity, religion, age, physical appearance, body size, race, or similar personal characteristics. 24 | We ask that you please respect that people have differences of opinion regarding technical choices, and that every design or implementation choice carries a trade-off and numerous costs. There is seldom a single right answer. A difference of technology preferences is not a license to be rude. 25 | Harassing other users of the Service for any reason is never tolerated, whether via public or private media. Any spamming, trolling, flaming, baiting, or other attention-stealing behavior is not welcome, and will not be tolerated. 26 | Even if your intent is not to harass or offend others, be mindful of how your comments might be perceived by others in the community. 27 | 28 | 29 | ## Unacceptable Behavior 30 | 31 | The following behaviors are considered harassment under this Code of Conduct and are unacceptable within our community: 32 | - Violence, threats of violence, or violent language directed against another person or group of people. 33 | - Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language. 34 | - Posting or displaying sexually explicit or violent material. 35 | - Posting or threatening to post other people’s personally identifying information ("doxing"). 36 | - Personal insults, particularly those related to related to gender identity, sexual orientation, ability, ethnicity, religion, age, physical appearance, body size, race, or similar personal characteristics. 37 | - Using offensive or harassing nicknames or other identifiers. 38 | - Inappropriate photography or recording. 39 | - Inappropriate physical contact. You should have someone’s consent before touching them. 40 | - Unwelcome sexual attention. This includes: sexualized comments or jokes; inappropriate touching, groping, and unwelcome sexual advances. 41 | - Deliberate intimidation, stalking, or following (online or in person). 42 | - Sustained disruption of community events, including talks and presentations. 43 | - Advocating for, or encouraging, any of the above behavior. 44 | 45 | ## Reporting Violations 46 | 47 | If you witness or experience unacceptable behavior in the CyberArk community, please promptly report it to our team at ReportAbuse@cyberark.com. If this is the initial report of a problem, please include as much detail as possible. It is easiest for us to address issues when we have more context. 48 | The CyberArk Community Team will look into any reported issues in a confidential manner and take any necessary actions to address and resolve the problem. 49 | We will not tolerate any form of retaliation towards users who report these issues to us. 50 | If you feel that you have been falsely or unfairly accused of violating this Code of Conduct by others in the community, you should notify the ReportAbuse@cyberark.com team so that we can address and resolve the accusation. 51 | As always, if you have an urgent security issue, contact product_security@cyberark.com and if you have concerns about a potential copyright violation, contact legal@cyberark.com. 52 | 53 | ## Consequences 54 | 55 | All content published to the Service, including user account credentials, is hosted at the sole discretion of the CyberArk administrators. If a community member engages in unacceptable behavior, the CyberArk administrators may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning. In general, we will choose the course of action that we judge as being most in the interest of fostering a safe and friendly community. 56 | 57 | ## Contact Info 58 | Please contact ReportAbuse@cyberark.com if you need to report a problem or address a grievance related to an abuse report. 59 | You are also encouraged to contact us if you have questions about what constitutes appropriate and inappropriate content. We are happy to provide guidance to help you be a successful part of our community. Our technical community is available [here](https://cyberark-customers.force.com/s/). 60 | 61 | ## Credit and License 62 | 63 | This Code of Conduct borrows from the [npm Code of Conduct](https://www.npmjs.com/policies/conduct), Stumptown Syndicate [Citizen's Code of Conduct](http://citizencodeofconduct.org/), and the [Rust Project Code of Conduct](https://www.rust-lang.org/conduct.html). 64 | This document may be reused under a [Creative Commons Attribution-ShareAlike License](https://creativecommons.org/licenses/by-sa/4.0/). 65 | 66 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright (c) 2023 CyberArk Software Ltd. All rights reserved. 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /NOTICES.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2023 CyberArk Software Ltd. All rights reserved 2 | 3 | PipeViewer is using the following open source components: 4 | 5 | NtApiDotNet (https://github.com/googleprojectzero/sandbox-attacksurface-analysis-tools) : Apache License 2.0 6 | (c) Google LLC. 2015 - 2021 7 | Developed by James Forshaw 8 | 9 | Be.HexEditor (https://github.com/Pkcs11Admin/Be.HexEditor and https://sourceforge.net/projects/hexbox/) : MIT License 10 | Copyright (c) 2011 Bernhard Elbl 11 | Developed by Jaroslav Imrich and Bernhard Elbl 12 | 13 | 14 | Apache License 2.0 15 | ====================== 16 | 17 | 18 | Apache License 19 | Version 2.0, January 2004 20 | http://www.apache.org/licenses/ 21 | 22 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 23 | 24 | 1. Definitions. 25 | 26 | "License" shall mean the terms and conditions for use, reproduction, 27 | and distribution as defined by Sections 1 through 9 of this document. 28 | 29 | "Licensor" shall mean the copyright owner or entity authorized by 30 | the copyright owner that is granting the License. 31 | 32 | "Legal Entity" shall mean the union of the acting entity and all 33 | other entities that control, are controlled by, or are under common 34 | control with that entity. For the purposes of this definition, 35 | "control" means (i) the power, direct or indirect, to cause the 36 | direction or management of such entity, whether by contract or 37 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 38 | outstanding shares, or (iii) beneficial ownership of such entity. 39 | 40 | "You" (or "Your") shall mean an individual or Legal Entity 41 | exercising permissions granted by this License. 42 | 43 | "Source" form shall mean the preferred form for making modifications, 44 | including but not limited to software source code, documentation 45 | source, and configuration files. 46 | 47 | "Object" form shall mean any form resulting from mechanical 48 | transformation or translation of a Source form, including but 49 | not limited to compiled object code, generated documentation, 50 | and conversions to other media types. 51 | 52 | "Work" shall mean the work of authorship, whether in Source or 53 | Object form, made available under the License, as indicated by a 54 | copyright notice that is included in or attached to the work 55 | (an example is provided in the Appendix below). 56 | 57 | "Derivative Works" shall mean any work, whether in Source or Object 58 | form, that is based on (or derived from) the Work and for which the 59 | editorial revisions, annotations, elaborations, or other modifications 60 | represent, as a whole, an original work of authorship. For the purposes 61 | of this License, Derivative Works shall not include works that remain 62 | separable from, or merely link (or bind by name) to the interfaces of, 63 | the Work and Derivative Works thereof. 64 | 65 | "Contribution" shall mean any work of authorship, including 66 | the original version of the Work and any modifications or additions 67 | to that Work or Derivative Works thereof, that is intentionally 68 | submitted to Licensor for inclusion in the Work by the copyright owner 69 | or by an individual or Legal Entity authorized to submit on behalf of 70 | the copyright owner. For the purposes of this definition, "submitted" 71 | means any form of electronic, verbal, or written communication sent 72 | to the Licensor or its representatives, including but not limited to 73 | communication on electronic mailing lists, source code control systems, 74 | and issue tracking systems that are managed by, or on behalf of, the 75 | Licensor for the purpose of discussing and improving the Work, but 76 | excluding communication that is conspicuously marked or otherwise 77 | designated in writing by the copyright owner as "Not a Contribution." 78 | 79 | "Contributor" shall mean Licensor and any individual or Legal Entity 80 | on behalf of whom a Contribution has been received by Licensor and 81 | subsequently incorporated within the Work. 82 | 83 | 2. Grant of Copyright License. Subject to the terms and conditions of 84 | this License, each Contributor hereby grants to You a perpetual, 85 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 86 | copyright license to reproduce, prepare Derivative Works of, 87 | publicly display, publicly perform, sublicense, and distribute the 88 | Work and such Derivative Works in Source or Object form. 89 | 90 | 3. Grant of Patent License. Subject to the terms and conditions of 91 | this License, each Contributor hereby grants to You a perpetual, 92 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 93 | (except as stated in this section) patent license to make, have made, 94 | use, offer to sell, sell, import, and otherwise transfer the Work, 95 | where such license applies only to those patent claims licensable 96 | by such Contributor that are necessarily infringed by their 97 | Contribution(s) alone or by combination of their Contribution(s) 98 | with the Work to which such Contribution(s) was submitted. If You 99 | institute patent litigation against any entity (including a 100 | cross-claim or counterclaim in a lawsuit) alleging that the Work 101 | or a Contribution incorporated within the Work constitutes direct 102 | or contributory patent infringement, then any patent licenses 103 | granted to You under this License for that Work shall terminate 104 | as of the date such litigation is filed. 105 | 106 | 4. Redistribution. You may reproduce and distribute copies of the 107 | Work or Derivative Works thereof in any medium, with or without 108 | modifications, and in Source or Object form, provided that You 109 | meet the following conditions: 110 | 111 | (a) You must give any other recipients of the Work or 112 | Derivative Works a copy of this License; and 113 | 114 | (b) You must cause any modified files to carry prominent notices 115 | stating that You changed the files; and 116 | 117 | (c) You must retain, in the Source form of any Derivative Works 118 | that You distribute, all copyright, patent, trademark, and 119 | attribution notices from the Source form of the Work, 120 | excluding those notices that do not pertain to any part of 121 | the Derivative Works; and 122 | 123 | (d) If the Work includes a "NOTICE" text file as part of its 124 | distribution, then any Derivative Works that You distribute must 125 | include a readable copy of the attribution notices contained 126 | within such NOTICE file, excluding those notices that do not 127 | pertain to any part of the Derivative Works, in at least one 128 | of the following places: within a NOTICE text file distributed 129 | as part of the Derivative Works; within the Source form or 130 | documentation, if provided along with the Derivative Works; or, 131 | within a display generated by the Derivative Works, if and 132 | wherever such third-party notices normally appear. The contents 133 | of the NOTICE file are for informational purposes only and 134 | do not modify the License. You may add Your own attribution 135 | notices within Derivative Works that You distribute, alongside 136 | or as an addendum to the NOTICE text from the Work, provided 137 | that such additional attribution notices cannot be construed 138 | as modifying the License. 139 | 140 | You may add Your own copyright statement to Your modifications and 141 | may provide additional or different license terms and conditions 142 | for use, reproduction, or distribution of Your modifications, or 143 | for any such Derivative Works as a whole, provided Your use, 144 | reproduction, and distribution of the Work otherwise complies with 145 | the conditions stated in this License. 146 | 147 | 5. Submission of Contributions. Unless You explicitly state otherwise, 148 | any Contribution intentionally submitted for inclusion in the Work 149 | by You to the Licensor shall be under the terms and conditions of 150 | this License, without any additional terms or conditions. 151 | Notwithstanding the above, nothing herein shall supersede or modify 152 | the terms of any separate license agreement you may have executed 153 | with Licensor regarding such Contributions. 154 | 155 | 6. Trademarks. This License does not grant permission to use the trade 156 | names, trademarks, service marks, or product names of the Licensor, 157 | except as required for reasonable and customary use in describing the 158 | origin of the Work and reproducing the content of the NOTICE file. 159 | 160 | 7. Disclaimer of Warranty. Unless required by applicable law or 161 | agreed to in writing, Licensor provides the Work (and each 162 | Contributor provides its Contributions) on an "AS IS" BASIS, 163 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 164 | implied, including, without limitation, any warranties or conditions 165 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 166 | PARTICULAR PURPOSE. You are solely responsible for determining the 167 | appropriateness of using or redistributing the Work and assume any 168 | risks associated with Your exercise of permissions under this License. 169 | 170 | 8. Limitation of Liability. In no event and under no legal theory, 171 | whether in tort (including negligence), contract, or otherwise, 172 | unless required by applicable law (such as deliberate and grossly 173 | negligent acts) or agreed to in writing, shall any Contributor be 174 | liable to You for damages, including any direct, indirect, special, 175 | incidental, or consequential damages of any character arising as a 176 | result of this License or out of the use or inability to use the 177 | Work (including but not limited to damages for loss of goodwill, 178 | work stoppage, computer failure or malfunction, or any and all 179 | other commercial damages or losses), even if such Contributor 180 | has been advised of the possibility of such damages. 181 | 182 | 9. Accepting Warranty or Additional Liability. While redistributing 183 | the Work or Derivative Works thereof, You may choose to offer, 184 | and charge a fee for, acceptance of support, warranty, indemnity, 185 | or other liability obligations and/or rights consistent with this 186 | License. However, in accepting such obligations, You may act only 187 | on Your own behalf and on Your sole responsibility, not on behalf 188 | of any other Contributor, and only if You agree to indemnify, 189 | defend, and hold each Contributor harmless for any liability 190 | incurred by, or claims asserted against, such Contributor by reason 191 | of your accepting any such warranty or additional liability. 192 | 193 | END OF TERMS AND CONDITIONS 194 | 195 | APPENDIX: How to apply the Apache License to your work. 196 | 197 | To apply the Apache License to your work, attach the following 198 | boilerplate notice, with the fields enclosed by brackets "[]" 199 | replaced with your own identifying information. (Don't include 200 | the brackets!) The text should be enclosed in the appropriate 201 | comment syntax for the file format. We also recommend that a 202 | file or class name and description of purpose be included on the 203 | same "printed page" as the copyright notice for easier 204 | identification within third-party archives. 205 | 206 | Copyright [yyyy] [name of copyright owner] 207 | 208 | Licensed under the Apache License, Version 2.0 (the "License"); 209 | you may not use this file except in compliance with the License. 210 | You may obtain a copy of the License at 211 | 212 | http://www.apache.org/licenses/LICENSE-2.0 213 | 214 | Unless required by applicable law or agreed to in writing, software 215 | distributed under the License is distributed on an "AS IS" BASIS, 216 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 217 | See the License for the specific language governing permissions and 218 | limitations under the License. 219 | 220 | 221 | 222 | MIT License 223 | =========== 224 | 225 | The MIT License 226 | 227 | Copyright (c) 2011 Bernhard Elbl 228 | 229 | Permission is hereby granted, free of charge, to any person obtaining a copy 230 | of this software and associated documentation files (the "Software"), to deal 231 | in the Software without restriction, including without limitation the rights 232 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 233 | copies of the Software, and to permit persons to whom the Software is 234 | furnished to do so, subject to the following conditions: 235 | 236 | The above copyright notice and this permission notice shall be included in 237 | all copies or substantial portions of the Software. 238 | 239 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 240 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 241 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 242 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 243 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 244 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 245 | THE SOFTWARE. 246 | -------------------------------------------------------------------------------- /NtApiDotNet.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/NtApiDotNet.dll -------------------------------------------------------------------------------- /PipeViewer.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.28307.1259 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PipeViewer", "PipeViewer\PipeViewer.csproj", "{2419CEDC-BF3A-4D8D-98F7-6403415BEEA4}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {2419CEDC-BF3A-4D8D-98F7-6403415BEEA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {2419CEDC-BF3A-4D8D-98F7-6403415BEEA4}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {2419CEDC-BF3A-4D8D-98F7-6403415BEEA4}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {2419CEDC-BF3A-4D8D-98F7-6403415BEEA4}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {14DCBED7-3363-40B7-854B-4C74885ACBA5} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /PipeViewer/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /PipeViewer/ColumnSelection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Windows.Forms; 4 | 5 | namespace PipeViewer 6 | { 7 | 8 | public delegate void selectColumnsEventHandler(GroupBox i_NamedPipe, GroupBox i_Access, GroupBox i_SecurityDescriptor, GroupBox TimeStamp); 9 | public partial class ColumnSelection : Form 10 | { 11 | public event selectColumnsEventHandler selectColumnsUpdate; 12 | public ColumnSelection(System.Windows.Forms.DataGridView dataGridView1) 13 | { 14 | InitializeComponent(); 15 | 16 | List visableColumns = new List(); 17 | foreach (DataGridViewColumn column in dataGridView1.Columns) 18 | { 19 | 20 | if (column.Visible) 21 | { 22 | visableColumns.Add(column.HeaderText); 23 | } 24 | } 25 | 26 | initializeCheckboxes(visableColumns); 27 | } 28 | 29 | // The name of the CheckBox header MUST be the same as the Column header. 30 | private void initializeCheckboxes(List visableColumns) 31 | { 32 | this.checkBoxEndpointType.Checked = visableColumns.Contains(this.checkBoxEndpointType.Text); 33 | this.checkBoxSddl.Checked = visableColumns.Contains(this.checkBoxSddl.Text); 34 | this.checkBoxName.Checked = visableColumns.Contains(this.checkBoxName.Text); 35 | this.checkBoxChangeTime.Checked = visableColumns.Contains(this.checkBoxChangeTime.Text); 36 | this.checkBoxLastWriteTime.Checked = visableColumns.Contains(this.checkBoxLastWriteTime.Text); 37 | this.checkBoxLastAccessTime.Checked = visableColumns.Contains(this.checkBoxLastAccessTime.Text); 38 | this.checkBoxFileCreationTime.Checked = visableColumns.Contains(this.checkBoxFileCreationTime.Text); 39 | this.checkBoxIntegrityLevel.Checked = visableColumns.Contains(this.checkBoxIntegrityLevel.Text); 40 | this.checkBoxPermissions.Checked = visableColumns.Contains(this.checkBoxPermissions.Text); 41 | this.checkBoxGroupSid.Checked = visableColumns.Contains(this.checkBoxGroupSid.Text); 42 | this.checkBoxOwnerSid.Checked = visableColumns.Contains(this.checkBoxOwnerSid.Text); 43 | this.checkBoxOwnerName.Checked = visableColumns.Contains(this.checkBoxOwnerName.Text); 44 | this.checkBoxGroupName.Checked = visableColumns.Contains(this.checkBoxGroupName.Text); 45 | this.checkBoxCreationTime.Checked = visableColumns.Contains(this.checkBoxCreationTime.Text); 46 | this.checkBoxClientProcessId.Checked = visableColumns.Contains(this.checkBoxClientProcessId.Text); 47 | this.checkBoxConfiguration.Checked = visableColumns.Contains(this.checkBoxConfiguration.Text); 48 | this.checkBoxPipeType.Checked = visableColumns.Contains(this.checkBoxPipeType.Text); 49 | this.checkBoxDirectoryGrantedAccess.Checked = visableColumns.Contains(this.checkBoxDirectoryGrantedAccess.Text); 50 | this.checkBoxReadMode.Checked = visableColumns.Contains(this.checkBoxReadMode.Text); 51 | this.checkBoxNumberOfLinks.Checked = visableColumns.Contains(this.checkBoxNumberOfLinks.Text); 52 | this.checkBoxGrantedAccess.Checked = visableColumns.Contains(this.checkBoxGrantedAccess.Text); 53 | this.checkBoxGrantedAccessGeneric.Checked = visableColumns.Contains(this.checkBoxGrantedAccessGeneric.Text); 54 | this.checkBoxHandle.Checked = visableColumns.Contains(this.checkBoxHandle.Text); 55 | } 56 | 57 | 58 | public virtual void OnselectColumnsUpdate(GroupBox i_NamedPipe, GroupBox i_Access, GroupBox i_SecurityDescriptor, GroupBox i_TimeStamp) 59 | { 60 | if (selectColumnsUpdate != null) 61 | { 62 | selectColumnsUpdate.Invoke(i_NamedPipe, i_Access, i_SecurityDescriptor, i_TimeStamp); 63 | } 64 | } 65 | 66 | private void buttonCancel_Click(object sender, EventArgs e) 67 | { 68 | this.Close(); 69 | } 70 | 71 | private void buttonOK_Click(object sender, EventArgs e) 72 | { 73 | OnselectColumnsUpdate(groupBoxNamedPipe, groupBoxAccess, groupBoxSecurityDescriptor, groupBoxTimeStamp); 74 | this.Close(); 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /PipeViewer/ColumnSelection.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /PipeViewer/Control/Engine.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Runtime.InteropServices; 4 | using NtApiDotNet; 5 | namespace PipeViewer.Control 6 | { 7 | static class Engine 8 | { 9 | public enum NamedPipeFunctionEndType 10 | { 11 | Server, 12 | Client 13 | } 14 | 15 | public static NtNamedPipeFileBase GetNamedPipeObject(string i_NamedPipe, NamedPipeFunctionEndType e_EndType) 16 | { 17 | NtNamedPipeFileBase namedPipeFileObject = null; 18 | 19 | i_NamedPipe = i_NamedPipe.Replace(@"\\.\pipe\", @"\Device\NamedPipe\"); 20 | //FileShareMode ShareMode = FileShareMode.Read | FileShareMode.Write; 21 | //FileOpenOptions Options = FileOpenOptions.SynchronousIoNonAlert; 22 | //FileAccessRights Access = FileAccessRights.GenericRead | FileAccessRights.GenericWrite | FileAccessRights.Synchronize; 23 | 24 | FileShareMode ShareMode = FileShareMode.None; 25 | FileOpenOptions Options = FileOpenOptions.None; 26 | FileAccessRights Access = FileAccessRights.MaximumAllowed; 27 | 28 | 29 | if (e_EndType == NamedPipeFunctionEndType.Client) 30 | { 31 | namedPipeFileObject = GetNamedPipeClientObject(i_NamedPipe, ShareMode, Options, Access); 32 | } else { 33 | namedPipeFileObject = GetNamedPipeServerObject(i_NamedPipe, ShareMode, Options, Access); 34 | } 35 | 36 | return namedPipeFileObject; 37 | } 38 | 39 | 40 | // https://github.com/googleprojectzero/sandbox-attacksurface-analysis-tools/blob/c02ed8ba04324e54a0a188ab9877ee6aa372dfac/NtObjectManager/Cmdlets/Object/GetNtNamedPipeFileCmdlet.cs 41 | public static NtNamedPipeFileBase GetNamedPipeClientObject(string i_NamedPipe, FileShareMode i_ShareMode, FileOpenOptions i_Options, FileAccessRights i_Access) 42 | { 43 | NtNamedPipeFileBase namedPipeFileObject = null; 44 | 45 | //i_NamedPipe = @"\Device\NamedPipe\Winsock2\CatalogChangeListener-5c0-0"; 46 | //i_NamedPipe = @"\Device\NamedPipe\WiFiNetworkManagerTask"; 47 | //i_NamedPipe = @"\Device\NamedPipe\initShutdown"; 48 | 49 | using (ObjectAttributes obj_attributes = new ObjectAttributes(i_NamedPipe)) 50 | { 51 | try 52 | { 53 | // https://github.com/googleprojectzero/sandbox-attacksurface-analysis-tools/issues/65 54 | // https://github.com/googleprojectzero/sandbox-attacksurface-analysis-tools/blob/c02ed8ba04324e54a0a188ab9877ee6aa372dfac/NtObjectManager/Cmdlets/Object/GetNtNamedPipeFileCmdlet.cs 55 | // https://github.com/googleprojectzero/sandbox-attacksurface-analysis-tools/blob/c02ed8ba04324e54a0a188ab9877ee6aa372dfac/NtObjectManager/Cmdlets/Object/GetNtFileCmdlet.cs 56 | namedPipeFileObject = (NtNamedPipeFileBase)NtFile.Open(obj_attributes, i_Access, i_ShareMode, i_Options); 57 | } 58 | catch (Exception e) 59 | { 60 | // In the future we can write to log 61 | } 62 | 63 | }; 64 | 65 | return namedPipeFileObject; 66 | } 67 | 68 | public static NtNamedPipeFileBase GetNamedPipeServerObject(string i_NamedPipe, FileShareMode i_ShareMode, FileOpenOptions i_Options, FileAccessRights i_Access) 69 | { 70 | NtNamedPipeFileBase namedPipeFileObject = null; 71 | 72 | using (ObjectAttributes obj_attributes = new ObjectAttributes(i_NamedPipe)) 73 | { 74 | try 75 | { 76 | namedPipeFileObject = NtFile.CreateNamedPipe(obj_attributes, i_Access, i_ShareMode, i_Options, FileDisposition.Open, NamedPipeType.Bytestream, 77 | NamedPipeReadMode.ByteStream, NamedPipeCompletionMode.CompleteOperation, 0, 0, 0, NtWaitTimeout.FromMilliseconds(0)); 78 | 79 | } 80 | catch (Exception) 81 | { 82 | // In the future we can write to log 83 | } 84 | }; 85 | 86 | return namedPipeFileObject; 87 | } 88 | 89 | 90 | /* 91 | * These permissions are based on tests we did on files 92 | * https://learn.microsoft.com/en-us/windows/win32/secauthz/standard-access-rights 93 | * https://blog.cjwdev.co.uk/2011/06/28/permissions-not-included-in-net-accessrule-filesystemrights-enum/ 94 | * https://www.installsetupconfig.com/win32programming/accesscontrollistacl2_1.html 95 | * https://superuser.com/questions/1752766/what-are-the-access-rules-of-standard-access-rights-and-object-specific-acces 96 | * 97 | Read: 00000000 00010010 00000000 10001001 : 00120089 98 | Read & Execute: 00000000 00010010 00000000 10101001 : 001200A9 99 | Write: 00000000 00010000 00000001 00010110 : 00100116 100 | Read & Write 00000000 00010010 00000001 10011111 : 0012019F 101 | Read & Write & Execute 00000000 00010010 00000001 10111111 : 001201BF 102 | Modify 00000000 00010011 00000001 10111111 : 001301BF 103 | Full 00000000 00011111 00000001 11111111 : 001F01FF 104 | 105 | Read ("Traverse folder / execute", "List folder / Read data", 106 | "Read Attribute", "Read Extended Attributes", "Read permissions") 107 | 108 | All advanced permissions separated: 109 | List folder / Read data 00000000 00010000 00000000 00000001 : 00100001 -> R (accesschk.exe) 110 | Read Attribute 00000000 00010000 00000000 10000000 : 00100080 -> no R (accesschk.exe) 111 | Read Extended Attributes 00000000 00010000 00000000 00001000 : 00100008 -> no R (accesschk.exe) 112 | Read permissions 00000000 00010010 00000000 00000000 : 00120000 -> no R (accesschk.exe) 113 | Traverse folder / execute 00000000 00010000 00000000 00100000 : 00100020 -> R (accesschk.exe) 114 | Create files / write data 00000000 00010000 00000000 00000010 : 00100002 -> W (accesschk.exe) 115 | Create folders / append data 00000000 00010000 00000000 00000100 : 00100004 -> W (accesschk.exe) 116 | Write attributes 00000000 00010000 00000001 00000000 : 00100100 -> no W (accesschk.exe) 117 | Write Extended eattributes 00000000 00010000 00000000 00010000 : 00100010 -> no W (accesschk.exe) 118 | Delete 00000000 00010001 00000000 00000000 : 00110000 -> W (accesschk.exe) 119 | Change permissions 00000000 00010100 00000000 00000000 : 00140000 -> RW (accesschk.exe) 120 | Change ownership 00000000 00011000 00000000 00000000 : 00180000 -> RW (accesschk.exe) 121 | 122 | 123 | R ("List folder / Read data", "Traverse folder / execute") -> 00000000 00010000 00000000 00100001 : 0x100021 (bits 0, 5, and 20) 124 | W ("Create files / write data", "Create folders / append data", "Delete") -> 00000000 00010001 00000000 00000110 : 0x110006 (bits 1, 2, 16, and 20) 125 | RW ("Change permissions", "Change ownership") -> 00000000 00011100 00000000 00000000 : 0x1c0000 (bits 18, 19, and 20) 126 | 127 | * */ 128 | enum PermissionsAccessMask 129 | { 130 | Read = 0x00120089, 131 | ReadAndExecute = 0x001200A9, 132 | Write = 0x00100116, 133 | ReadWrite = 0x0012019F, 134 | ReadWriteExecute = 0x001201BF, 135 | Modify = 0x001301BF, 136 | Full = 0x001F01FF, 137 | ListFolderReadData = 0x00100001, 138 | ReadAttribute = 0x00100080, 139 | ReadExtendedAttributes = 0x00100008, 140 | ReadPermissions = 0x00120000, 141 | TraverseFolderExecute = 0x00100020, 142 | CreateFilesWriteData = 0x00100002, 143 | CreateFoldersAppendData = 0x00100004, 144 | WriteAttributes = 0x00100100, 145 | WriteExtendedAttributes = 0x00100010, 146 | Delete = 0x00110000, 147 | ChangePermissions = 0x00140000, 148 | ChangeOwnership = 0x00180000 149 | } 150 | 151 | 152 | public static string ConvertAccessMaskToSimplePermissions(uint i_AccessMask) 153 | { 154 | // Eviatar: Should we consider bit number 20 ? On files it always set to 1 but on named pipe it's not. 155 | // We currently left it 0. 156 | string permissions = ""; 157 | 158 | 159 | if ((i_AccessMask & (uint)PermissionsAccessMask.Full) == (uint)PermissionsAccessMask.Full) 160 | { 161 | permissions = "Full"; 162 | } else if ((i_AccessMask & (uint)PermissionsAccessMask.Modify) == (uint)PermissionsAccessMask.Modify) 163 | { 164 | permissions = "RWX"; 165 | } else if ((i_AccessMask & (uint)PermissionsAccessMask.ReadWriteExecute) == (uint)PermissionsAccessMask.ReadWriteExecute) 166 | { 167 | permissions = "RWX"; 168 | } else if ((i_AccessMask & (uint)PermissionsAccessMask.ReadWrite) == (uint)PermissionsAccessMask.ReadWrite) 169 | { 170 | permissions = "RW"; 171 | } else if((i_AccessMask & (uint)PermissionsAccessMask.Write) == (uint)PermissionsAccessMask.Write) 172 | { 173 | permissions = "W"; 174 | } else if((i_AccessMask & (uint)PermissionsAccessMask.ReadAndExecute) == (uint)PermissionsAccessMask.ReadAndExecute) 175 | { 176 | permissions = "RX"; 177 | } else if ((i_AccessMask & (uint)PermissionsAccessMask.Read) == (uint)PermissionsAccessMask.Read) 178 | { 179 | permissions = "R"; 180 | } else 181 | { 182 | permissions = "(special)"; 183 | } 184 | 185 | /* 186 | * 187 | * 188 | * if (i_AccessMask == 1180059) // 00010010 00000001 10011011 189 | { 190 | int a = 2; 191 | 192 | } 193 | * * 194 | * When using the binary check, it gave RW for pipes that according to the standard security properties have R permissions. 195 | * We change it to check based on hardcoded values for the permissions. 196 | */ 197 | 198 | 199 | //byte[] byteArray = BitConverter.GetBytes(i_AccessMask); 200 | //byte[] binaryArray = Convert.ToString(i_AccessMask, 2) 201 | // .PadLeft(32, '0') 202 | // .Select(c => byte.Parse(c.ToString())) 203 | // .Reverse() 204 | // .ToArray(); 205 | 206 | 207 | //if ((binaryArray[0] == 1 || binaryArray[5] == 1))// && binaryArray[20] == 1) 208 | //{ 209 | // permissions += "R"; 210 | //} 211 | 212 | //if ((binaryArray[1] == 1 || binaryArray[2] == 1 || binaryArray[16] == 1))// && binaryArray[20] == 1) 213 | //{ 214 | // permissions += "W"; 215 | //} 216 | 217 | //if ((binaryArray[18] == 1 || binaryArray[19] == 1) )//&& binaryArray[20] == 1) 218 | //{ 219 | // permissions = "RW"; 220 | //} 221 | 222 | //uint readPermissions = ((uint)PermissionsAccessMask.ListFolderReadData | (uint)PermissionsAccessMask.TraverseFolderExecute) & i_AccessMask; 223 | 224 | return permissions; 225 | } 226 | 227 | //public static NtFile CreateNamedPipe(string name, NtObject root, FileAccessRights desired_access, 228 | // FileShareMode share_access, FileOpenOptions open_options, FileDisposition disposition, NamedPipeType pipe_type, 229 | // NamedPipeReadMode read_mode, NamedPipeCompletionMode completion_mode, int maximum_instances, int input_quota, 230 | // int output_quota, NtWaitTimeout default_timeout) 231 | //{ 232 | // using (ObjectAttributes obj_attributes = new ObjectAttributes(name, AttributeFlags.CaseInsensitive, root)) 233 | // { 234 | // return NtFile.CreateNamedPipe(obj_attributes, desired_access, share_access, open_options, disposition, pipe_type, 235 | // read_mode, completion_mode, maximum_instances, input_quota, output_quota, default_timeout); 236 | // } 237 | //} 238 | 239 | } 240 | } 241 | -------------------------------------------------------------------------------- /PipeViewer/FormAbout.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace PipeViewer 2 | { 3 | partial class FormAbout 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.textBox1 = new System.Windows.Forms.TextBox(); 32 | this.linkLabel1 = new System.Windows.Forms.LinkLabel(); 33 | this.SuspendLayout(); 34 | // 35 | // textBox1 36 | // 37 | this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; 38 | this.textBox1.Location = new System.Drawing.Point(12, 19); 39 | this.textBox1.Multiline = true; 40 | this.textBox1.Name = "textBox1"; 41 | this.textBox1.ReadOnly = true; 42 | this.textBox1.Size = new System.Drawing.Size(346, 179); 43 | this.textBox1.TabIndex = 0; 44 | this.textBox1.Text = "Author: Eviatar Gerzi (@g3rzi)\r\n\r\nContributers: Natan Tunik\r\n\r\nVersion: 1.2\r\n\r\n\r\n" + 45 | "\r\nCopyright (c) 2023 CyberArk Software Ltd. All rights reserved\r\n\r\n"; 46 | // 47 | // linkLabel1 48 | // 49 | this.linkLabel1.AutoSize = true; 50 | this.linkLabel1.Location = new System.Drawing.Point(12, 104); 51 | this.linkLabel1.Name = "linkLabel1"; 52 | this.linkLabel1.Size = new System.Drawing.Size(199, 13); 53 | this.linkLabel1.TabIndex = 1; 54 | this.linkLabel1.TabStop = true; 55 | this.linkLabel1.Text = "https://github.com/cyberark/PipeViewer"; 56 | // 57 | // FormAbout 58 | // 59 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 60 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 61 | this.ClientSize = new System.Drawing.Size(379, 210); 62 | this.Controls.Add(this.linkLabel1); 63 | this.Controls.Add(this.textBox1); 64 | this.Name = "FormAbout"; 65 | this.ShowIcon = false; 66 | this.Text = "About"; 67 | this.ResumeLayout(false); 68 | this.PerformLayout(); 69 | 70 | } 71 | 72 | #endregion 73 | 74 | private System.Windows.Forms.TextBox textBox1; 75 | private System.Windows.Forms.LinkLabel linkLabel1; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /PipeViewer/FormAbout.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | namespace PipeViewer 12 | { 13 | public partial class FormAbout : Form 14 | { 15 | public FormAbout() 16 | { 17 | InitializeComponent(); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /PipeViewer/FormAbout.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /PipeViewer/FormColumnFilter.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace PipeViewer 2 | { 3 | partial class FormColumnFilter 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.label1 = new System.Windows.Forms.Label(); 32 | this.comboBoxSearchByColumn = new System.Windows.Forms.ComboBox(); 33 | this.comboBoxRelation = new System.Windows.Forms.ComboBox(); 34 | this.comboBoxValue = new System.Windows.Forms.ComboBox(); 35 | this.listViewColumnFilters = new System.Windows.Forms.ListView(); 36 | this.columnHeaderColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 37 | this.columnHeaderRelation = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 38 | this.columnHeaderValue = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 39 | this.columnHeaderAction = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 40 | this.comboBoxAction = new System.Windows.Forms.ComboBox(); 41 | this.buttonOK = new System.Windows.Forms.Button(); 42 | this.buttonCancel = new System.Windows.Forms.Button(); 43 | this.buttonAdd = new System.Windows.Forms.Button(); 44 | this.buttonRemove = new System.Windows.Forms.Button(); 45 | this.labelThen = new System.Windows.Forms.Label(); 46 | this.buttonReset = new System.Windows.Forms.Button(); 47 | this.buttonApply = new System.Windows.Forms.Button(); 48 | this.SuspendLayout(); 49 | // 50 | // label1 51 | // 52 | this.label1.AutoSize = true; 53 | this.label1.Location = new System.Drawing.Point(12, 9); 54 | this.label1.Name = "label1"; 55 | this.label1.Size = new System.Drawing.Size(205, 13); 56 | this.label1.TabIndex = 0; 57 | this.label1.Text = "Display entried matching these conditions:"; 58 | // 59 | // comboBoxSearchByColumn 60 | // 61 | this.comboBoxSearchByColumn.BackColor = System.Drawing.SystemColors.Window; 62 | this.comboBoxSearchByColumn.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 63 | this.comboBoxSearchByColumn.FormattingEnabled = true; 64 | this.comboBoxSearchByColumn.Items.AddRange(Utils.ColumnNames); 65 | this.comboBoxSearchByColumn.Location = new System.Drawing.Point(12, 25); 66 | this.comboBoxSearchByColumn.Name = "comboBoxSearchByColumn"; 67 | this.comboBoxSearchByColumn.Size = new System.Drawing.Size(121, 21); 68 | this.comboBoxSearchByColumn.TabIndex = 1; 69 | // 70 | // comboBoxRelation 71 | // 72 | this.comboBoxRelation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 73 | this.comboBoxRelation.FormattingEnabled = true; 74 | this.comboBoxRelation.Items.AddRange(new object[] { 75 | "contains", 76 | "is", 77 | "begins with", 78 | "ends with"}); 79 | this.comboBoxRelation.Location = new System.Drawing.Point(140, 26); 80 | this.comboBoxRelation.Name = "comboBoxRelation"; 81 | this.comboBoxRelation.Size = new System.Drawing.Size(87, 21); 82 | this.comboBoxRelation.TabIndex = 2; 83 | // 84 | // comboBoxValue 85 | // 86 | this.comboBoxValue.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 87 | | System.Windows.Forms.AnchorStyles.Right))); 88 | this.comboBoxValue.FormattingEnabled = true; 89 | this.comboBoxValue.Location = new System.Drawing.Point(244, 25); 90 | this.comboBoxValue.Name = "comboBoxValue"; 91 | this.comboBoxValue.Size = new System.Drawing.Size(428, 21); 92 | this.comboBoxValue.TabIndex = 3; 93 | // 94 | // listViewColumnFilters 95 | // 96 | this.listViewColumnFilters.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 97 | | System.Windows.Forms.AnchorStyles.Left) 98 | | System.Windows.Forms.AnchorStyles.Right))); 99 | this.listViewColumnFilters.CheckBoxes = true; 100 | this.listViewColumnFilters.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { 101 | this.columnHeaderColumn, 102 | this.columnHeaderRelation, 103 | this.columnHeaderValue, 104 | this.columnHeaderAction}); 105 | this.listViewColumnFilters.HideSelection = false; 106 | this.listViewColumnFilters.Location = new System.Drawing.Point(15, 85); 107 | this.listViewColumnFilters.Name = "listViewColumnFilters"; 108 | this.listViewColumnFilters.Size = new System.Drawing.Size(792, 351); 109 | this.listViewColumnFilters.TabIndex = 4; 110 | this.listViewColumnFilters.UseCompatibleStateImageBehavior = false; 111 | this.listViewColumnFilters.View = System.Windows.Forms.View.Details; 112 | this.listViewColumnFilters.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listViewColumnFilters_MouseDoubleClick); 113 | // 114 | // columnHeaderColumn 115 | // 116 | this.columnHeaderColumn.Text = "Column"; 117 | this.columnHeaderColumn.Width = 92; 118 | // 119 | // columnHeaderRelation 120 | // 121 | this.columnHeaderRelation.Text = "Relation"; 122 | // 123 | // columnHeaderValue 124 | // 125 | this.columnHeaderValue.Text = "Value"; 126 | // 127 | // columnHeaderAction 128 | // 129 | this.columnHeaderAction.Text = "Action"; 130 | // 131 | // comboBoxAction 132 | // 133 | this.comboBoxAction.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 134 | this.comboBoxAction.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 135 | this.comboBoxAction.FormattingEnabled = true; 136 | this.comboBoxAction.Items.AddRange(new object[] { 137 | "Include", 138 | "Exclude"}); 139 | this.comboBoxAction.Location = new System.Drawing.Point(720, 25); 140 | this.comboBoxAction.Name = "comboBoxAction"; 141 | this.comboBoxAction.Size = new System.Drawing.Size(84, 21); 142 | this.comboBoxAction.TabIndex = 5; 143 | // 144 | // buttonOK 145 | // 146 | this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 147 | this.buttonOK.Location = new System.Drawing.Point(567, 454); 148 | this.buttonOK.Name = "buttonOK"; 149 | this.buttonOK.Size = new System.Drawing.Size(75, 23); 150 | this.buttonOK.TabIndex = 6; 151 | this.buttonOK.Text = "OK"; 152 | this.buttonOK.UseVisualStyleBackColor = true; 153 | this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); 154 | // 155 | // buttonCancel 156 | // 157 | this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 158 | this.buttonCancel.Location = new System.Drawing.Point(648, 454); 159 | this.buttonCancel.Name = "buttonCancel"; 160 | this.buttonCancel.Size = new System.Drawing.Size(75, 23); 161 | this.buttonCancel.TabIndex = 7; 162 | this.buttonCancel.Text = "Cancel"; 163 | this.buttonCancel.UseVisualStyleBackColor = true; 164 | this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); 165 | // 166 | // buttonAdd 167 | // 168 | this.buttonAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 169 | this.buttonAdd.Location = new System.Drawing.Point(639, 56); 170 | this.buttonAdd.Name = "buttonAdd"; 171 | this.buttonAdd.Size = new System.Drawing.Size(75, 23); 172 | this.buttonAdd.TabIndex = 8; 173 | this.buttonAdd.Text = "Add"; 174 | this.buttonAdd.UseVisualStyleBackColor = true; 175 | this.buttonAdd.Click += new System.EventHandler(this.buttonAdd_Click); 176 | // 177 | // buttonRemove 178 | // 179 | this.buttonRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 180 | this.buttonRemove.Location = new System.Drawing.Point(729, 56); 181 | this.buttonRemove.Name = "buttonRemove"; 182 | this.buttonRemove.Size = new System.Drawing.Size(75, 23); 183 | this.buttonRemove.TabIndex = 9; 184 | this.buttonRemove.Text = "Remove"; 185 | this.buttonRemove.UseVisualStyleBackColor = true; 186 | this.buttonRemove.Click += new System.EventHandler(this.buttonRemove_Click); 187 | // 188 | // labelThen 189 | // 190 | this.labelThen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 191 | this.labelThen.AutoSize = true; 192 | this.labelThen.Location = new System.Drawing.Point(678, 28); 193 | this.labelThen.Name = "labelThen"; 194 | this.labelThen.Size = new System.Drawing.Size(28, 13); 195 | this.labelThen.TabIndex = 10; 196 | this.labelThen.Text = "then"; 197 | // 198 | // buttonReset 199 | // 200 | this.buttonReset.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 201 | this.buttonReset.Location = new System.Drawing.Point(31, 56); 202 | this.buttonReset.Name = "buttonReset"; 203 | this.buttonReset.Size = new System.Drawing.Size(75, 23); 204 | this.buttonReset.TabIndex = 11; 205 | this.buttonReset.Text = "Reset"; 206 | this.buttonReset.UseVisualStyleBackColor = true; 207 | this.buttonReset.Click += new System.EventHandler(this.buttonReset_Click); 208 | // 209 | // buttonApply 210 | // 211 | this.buttonApply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 212 | this.buttonApply.Location = new System.Drawing.Point(732, 454); 213 | this.buttonApply.Name = "buttonApply"; 214 | this.buttonApply.Size = new System.Drawing.Size(75, 23); 215 | this.buttonApply.TabIndex = 13; 216 | this.buttonApply.Text = "Apply"; 217 | this.buttonApply.UseVisualStyleBackColor = true; 218 | this.buttonApply.Click += new System.EventHandler(this.buttonApply_Click); 219 | // 220 | // FormColumnFilter 221 | // 222 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 223 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 224 | this.ClientSize = new System.Drawing.Size(816, 489); 225 | this.Controls.Add(this.buttonApply); 226 | this.Controls.Add(this.buttonReset); 227 | this.Controls.Add(this.labelThen); 228 | this.Controls.Add(this.buttonRemove); 229 | this.Controls.Add(this.buttonAdd); 230 | this.Controls.Add(this.buttonCancel); 231 | this.Controls.Add(this.buttonOK); 232 | this.Controls.Add(this.comboBoxAction); 233 | this.Controls.Add(this.listViewColumnFilters); 234 | this.Controls.Add(this.comboBoxValue); 235 | this.Controls.Add(this.comboBoxRelation); 236 | this.Controls.Add(this.comboBoxSearchByColumn); 237 | this.Controls.Add(this.label1); 238 | this.Name = "FormColumnFilter"; 239 | this.ShowIcon = false; 240 | this.Text = "PipeViewer Filter"; 241 | this.ResumeLayout(false); 242 | this.PerformLayout(); 243 | 244 | } 245 | 246 | #endregion 247 | 248 | private System.Windows.Forms.Label label1; 249 | private System.Windows.Forms.ComboBox comboBoxSearchByColumn; 250 | private System.Windows.Forms.ComboBox comboBoxRelation; 251 | private System.Windows.Forms.ComboBox comboBoxValue; 252 | private System.Windows.Forms.ListView listViewColumnFilters; 253 | private System.Windows.Forms.ColumnHeader columnHeaderColumn; 254 | private System.Windows.Forms.ColumnHeader columnHeaderRelation; 255 | private System.Windows.Forms.ColumnHeader columnHeaderValue; 256 | private System.Windows.Forms.ColumnHeader columnHeaderAction; 257 | private System.Windows.Forms.ComboBox comboBoxAction; 258 | private System.Windows.Forms.Button buttonOK; 259 | private System.Windows.Forms.Button buttonCancel; 260 | private System.Windows.Forms.Button buttonAdd; 261 | private System.Windows.Forms.Button buttonRemove; 262 | private System.Windows.Forms.Label labelThen; 263 | private System.Windows.Forms.Button buttonReset; 264 | private System.Windows.Forms.Button buttonApply; 265 | } 266 | } -------------------------------------------------------------------------------- /PipeViewer/FormColumnFilter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | using static System.Windows.Forms.ListViewItem; 4 | 5 | namespace PipeViewer 6 | { 7 | public delegate void FilterOKEventHandler(ListView i_listViewColumnFilter); 8 | public partial class FormColumnFilter : Form 9 | { 10 | private DataGridView m_DataGridView; 11 | public event FilterOKEventHandler FilterOKUpdate; 12 | public FormColumnFilter(ref ListView i_ListViewColumnFilter) 13 | { 14 | InitializeComponentWrapper(); 15 | 16 | foreach (ListViewItem item in i_ListViewColumnFilter.Items) 17 | { 18 | ListViewItem clonedItem = (ListViewItem)item.Clone(); 19 | this.listViewColumnFilters.Items.Add(clonedItem); 20 | } 21 | } 22 | 23 | public virtual void OnFilterOKUpdate(ListView i_listViewColumnFilter) 24 | { 25 | bool empty = true; 26 | foreach (ListViewItem item in i_listViewColumnFilter.Items) 27 | { 28 | if (item.Checked) 29 | { 30 | empty = false; 31 | } 32 | } 33 | if (empty) 34 | { 35 | i_listViewColumnFilter = new ListView(); 36 | } 37 | if (FilterOKUpdate != null) 38 | { 39 | FilterOKUpdate.Invoke(i_listViewColumnFilter); 40 | } 41 | } 42 | 43 | private void InitializeComponentWrapper() 44 | { 45 | InitializeComponent(); 46 | this.comboBoxSearchByColumn.SelectedIndex = 0; 47 | this.comboBoxRelation.SelectedIndex = 0; 48 | this.comboBoxAction.SelectedIndex = 0; 49 | this.listViewColumnFilters.FullRowSelect = true; 50 | } 51 | 52 | public FormColumnFilter(ref DataGridView i_DataGridView) 53 | { 54 | m_DataGridView = i_DataGridView; 55 | InitializeComponentWrapper(); 56 | } 57 | 58 | private void buttonOK_Click(object sender, EventArgs e) 59 | { 60 | buttonAdd_Click(sender, e); 61 | OnFilterOKUpdate(this.listViewColumnFilters); 62 | this.Close(); 63 | } 64 | 65 | private void buttonCancel_Click(object sender, EventArgs e) 66 | { 67 | this.Close(); 68 | } 69 | 70 | // DUPLICATED function in FormHighlighting 71 | // Maybe create a shared function in Utils but it threw an exception for "type initializer" 72 | private bool isRowExist(string i_Column, string i_Relation, string i_Value, string i_Action) 73 | { 74 | bool isExist = false; 75 | string newRow = i_Column + i_Relation + i_Value + i_Action; 76 | foreach (ListViewItem item in listViewColumnFilters.Items) 77 | { 78 | string rawRow = ""; 79 | foreach (ListViewSubItem subItem in item.SubItems) 80 | { 81 | rawRow += subItem.Text; 82 | } 83 | 84 | if (newRow == rawRow) 85 | { 86 | isExist = true; 87 | break; 88 | } 89 | 90 | } 91 | 92 | return isExist; 93 | } 94 | 95 | private void buttonAdd_Click(object sender, EventArgs e) 96 | { 97 | if (!isRowExist(comboBoxSearchByColumn.Text, comboBoxRelation.Text, comboBoxValue.Text, comboBoxAction.Text) && comboBoxValue.Text != "") 98 | { 99 | ListViewItem item = new ListViewItem(comboBoxSearchByColumn.Text); 100 | item.SubItems.Add(comboBoxRelation.Text); 101 | item.SubItems.Add(comboBoxValue.Text); 102 | item.SubItems.Add(comboBoxAction.Text); 103 | item.Checked = true; 104 | this.listViewColumnFilters.Items.Add(item); 105 | } 106 | } 107 | 108 | private void buttonRemove_Click(object sender, EventArgs e) 109 | { 110 | foreach (ListViewItem item in this.listViewColumnFilters.SelectedItems) 111 | { 112 | item.Remove(); 113 | } 114 | } 115 | 116 | private void listViewColumnFilters_MouseDoubleClick(object sender, MouseEventArgs e) 117 | { 118 | foreach (ListViewItem item in ((ListView)sender).SelectedItems) 119 | { 120 | this.comboBoxSearchByColumn.Text = item.SubItems[0].Text; 121 | this.comboBoxRelation.Text = item.SubItems[1].Text; 122 | this.comboBoxValue.Text = item.SubItems[2].Text; 123 | this.comboBoxAction.Text = item.SubItems[3].Text; 124 | item.Remove(); 125 | } 126 | } 127 | 128 | private void buttonReset_Click(object sender, EventArgs e) 129 | { 130 | listViewColumnFilters.Items.Clear(); 131 | } 132 | 133 | private void buttonApply_Click(object sender, EventArgs e) 134 | { 135 | buttonAdd_Click(sender, e); 136 | OnFilterOKUpdate(this.listViewColumnFilters); 137 | } 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /PipeViewer/FormColumnFilter.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /PipeViewer/FormHighlighting.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace PipeViewer 2 | { 3 | partial class FormHighlighting 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.labelHighlight = new System.Windows.Forms.Label(); 32 | this.comboBoxColumn = new System.Windows.Forms.ComboBox(); 33 | this.comboBoxRelation = new System.Windows.Forms.ComboBox(); 34 | this.comboBoxValue = new System.Windows.Forms.ComboBox(); 35 | this.labelThen = new System.Windows.Forms.Label(); 36 | this.comboBoxAction = new System.Windows.Forms.ComboBox(); 37 | this.listViewHighlights = new System.Windows.Forms.ListView(); 38 | this.columnHeaderColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 39 | this.columnHeaderRelation = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 40 | this.columnHeaderValue = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 41 | this.columnHeaderAction = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 42 | this.buttonOK = new System.Windows.Forms.Button(); 43 | this.buttonCancel = new System.Windows.Forms.Button(); 44 | this.buttonAdd = new System.Windows.Forms.Button(); 45 | this.buttonRemove = new System.Windows.Forms.Button(); 46 | this.buttonReset = new System.Windows.Forms.Button(); 47 | this.buttonApply = new System.Windows.Forms.Button(); 48 | this.SuspendLayout(); 49 | // 50 | // labelHighlight 51 | // 52 | this.labelHighlight.AutoSize = true; 53 | this.labelHighlight.Location = new System.Drawing.Point(12, 9); 54 | this.labelHighlight.Name = "labelHighlight"; 55 | this.labelHighlight.Size = new System.Drawing.Size(211, 13); 56 | this.labelHighlight.TabIndex = 0; 57 | this.labelHighlight.Text = "Highlight entries matching these conditions:"; 58 | // 59 | // comboBoxColumn 60 | // 61 | this.comboBoxColumn.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 62 | this.comboBoxColumn.FormattingEnabled = true; 63 | this.comboBoxColumn.Items.AddRange(Utils.ColumnNames); 64 | this.comboBoxColumn.Location = new System.Drawing.Point(12, 25); 65 | this.comboBoxColumn.Name = "comboBoxColumn"; 66 | this.comboBoxColumn.Size = new System.Drawing.Size(121, 21); 67 | this.comboBoxColumn.TabIndex = 1; 68 | // 69 | // comboBoxRelation 70 | // 71 | this.comboBoxRelation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 72 | this.comboBoxRelation.FormattingEnabled = true; 73 | this.comboBoxRelation.Items.AddRange(new object[] { 74 | "contains", 75 | "is", 76 | "begins with", 77 | "ends with"}); 78 | this.comboBoxRelation.Location = new System.Drawing.Point(139, 25); 79 | this.comboBoxRelation.Name = "comboBoxRelation"; 80 | this.comboBoxRelation.Size = new System.Drawing.Size(71, 21); 81 | this.comboBoxRelation.TabIndex = 2; 82 | // 83 | // comboBoxValue 84 | // 85 | this.comboBoxValue.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 86 | | System.Windows.Forms.AnchorStyles.Right))); 87 | this.comboBoxValue.FormattingEnabled = true; 88 | this.comboBoxValue.Location = new System.Drawing.Point(216, 25); 89 | this.comboBoxValue.Name = "comboBoxValue"; 90 | this.comboBoxValue.Size = new System.Drawing.Size(313, 21); 91 | this.comboBoxValue.TabIndex = 3; 92 | // 93 | // labelThen 94 | // 95 | this.labelThen.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 96 | | System.Windows.Forms.AnchorStyles.Right))); 97 | this.labelThen.AutoSize = true; 98 | this.labelThen.Location = new System.Drawing.Point(535, 28); 99 | this.labelThen.Name = "labelThen"; 100 | this.labelThen.Size = new System.Drawing.Size(28, 13); 101 | this.labelThen.TabIndex = 4; 102 | this.labelThen.Text = "then"; 103 | // 104 | // comboBoxAction 105 | // 106 | this.comboBoxAction.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 107 | this.comboBoxAction.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 108 | this.comboBoxAction.FormattingEnabled = true; 109 | this.comboBoxAction.Items.AddRange(new object[] { 110 | "Include", 111 | "Exclude"}); 112 | this.comboBoxAction.Location = new System.Drawing.Point(573, 22); 113 | this.comboBoxAction.Name = "comboBoxAction"; 114 | this.comboBoxAction.Size = new System.Drawing.Size(71, 21); 115 | this.comboBoxAction.TabIndex = 5; 116 | // 117 | // listViewHighlights 118 | // 119 | this.listViewHighlights.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 120 | | System.Windows.Forms.AnchorStyles.Left) 121 | | System.Windows.Forms.AnchorStyles.Right))); 122 | this.listViewHighlights.CheckBoxes = true; 123 | this.listViewHighlights.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { 124 | this.columnHeaderColumn, 125 | this.columnHeaderRelation, 126 | this.columnHeaderValue, 127 | this.columnHeaderAction}); 128 | this.listViewHighlights.HideSelection = false; 129 | this.listViewHighlights.Location = new System.Drawing.Point(12, 85); 130 | this.listViewHighlights.Name = "listViewHighlights"; 131 | this.listViewHighlights.Size = new System.Drawing.Size(635, 306); 132 | this.listViewHighlights.TabIndex = 6; 133 | this.listViewHighlights.UseCompatibleStateImageBehavior = false; 134 | this.listViewHighlights.View = System.Windows.Forms.View.Details; 135 | this.listViewHighlights.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listViewHighlights_MouseDoubleClick); 136 | // 137 | // columnHeaderColumn 138 | // 139 | this.columnHeaderColumn.Text = "Column"; 140 | // 141 | // columnHeaderRelation 142 | // 143 | this.columnHeaderRelation.Text = "Relation"; 144 | // 145 | // columnHeaderValue 146 | // 147 | this.columnHeaderValue.Text = "Value"; 148 | // 149 | // columnHeaderAction 150 | // 151 | this.columnHeaderAction.Text = "Action"; 152 | // 153 | // buttonOK 154 | // 155 | this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 156 | this.buttonOK.Location = new System.Drawing.Point(407, 397); 157 | this.buttonOK.Name = "buttonOK"; 158 | this.buttonOK.Size = new System.Drawing.Size(75, 23); 159 | this.buttonOK.TabIndex = 7; 160 | this.buttonOK.Text = "OK"; 161 | this.buttonOK.UseVisualStyleBackColor = true; 162 | this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); 163 | // 164 | // buttonCancel 165 | // 166 | this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 167 | this.buttonCancel.Location = new System.Drawing.Point(488, 397); 168 | this.buttonCancel.Name = "buttonCancel"; 169 | this.buttonCancel.Size = new System.Drawing.Size(75, 23); 170 | this.buttonCancel.TabIndex = 8; 171 | this.buttonCancel.Text = "Cancel"; 172 | this.buttonCancel.UseVisualStyleBackColor = true; 173 | this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); 174 | // 175 | // buttonAdd 176 | // 177 | this.buttonAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 178 | this.buttonAdd.Location = new System.Drawing.Point(488, 56); 179 | this.buttonAdd.Name = "buttonAdd"; 180 | this.buttonAdd.Size = new System.Drawing.Size(75, 23); 181 | this.buttonAdd.TabIndex = 9; 182 | this.buttonAdd.Text = "Add"; 183 | this.buttonAdd.UseVisualStyleBackColor = true; 184 | this.buttonAdd.Click += new System.EventHandler(this.buttonAdd_Click); 185 | // 186 | // buttonRemove 187 | // 188 | this.buttonRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 189 | this.buttonRemove.Location = new System.Drawing.Point(569, 56); 190 | this.buttonRemove.Name = "buttonRemove"; 191 | this.buttonRemove.Size = new System.Drawing.Size(75, 23); 192 | this.buttonRemove.TabIndex = 10; 193 | this.buttonRemove.Text = "Remove"; 194 | this.buttonRemove.UseVisualStyleBackColor = true; 195 | this.buttonRemove.Click += new System.EventHandler(this.buttonRemove_Click); 196 | // 197 | // buttonReset 198 | // 199 | this.buttonReset.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 200 | this.buttonReset.Location = new System.Drawing.Point(28, 56); 201 | this.buttonReset.Name = "buttonReset"; 202 | this.buttonReset.Size = new System.Drawing.Size(75, 23); 203 | this.buttonReset.TabIndex = 11; 204 | this.buttonReset.Text = "Reset"; 205 | this.buttonReset.UseVisualStyleBackColor = true; 206 | this.buttonReset.Click += new System.EventHandler(this.buttonReset_Click); 207 | // 208 | // buttonApply 209 | // 210 | this.buttonApply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 211 | this.buttonApply.Location = new System.Drawing.Point(569, 397); 212 | this.buttonApply.Name = "buttonApply"; 213 | this.buttonApply.Size = new System.Drawing.Size(75, 23); 214 | this.buttonApply.TabIndex = 12; 215 | this.buttonApply.Text = "Apply"; 216 | this.buttonApply.UseVisualStyleBackColor = true; 217 | this.buttonApply.Click += new System.EventHandler(this.buttonApply_Click); 218 | // 219 | // FormHighlighting 220 | // 221 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 222 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 223 | this.ClientSize = new System.Drawing.Size(659, 432); 224 | this.Controls.Add(this.buttonApply); 225 | this.Controls.Add(this.buttonReset); 226 | this.Controls.Add(this.buttonRemove); 227 | this.Controls.Add(this.buttonAdd); 228 | this.Controls.Add(this.buttonCancel); 229 | this.Controls.Add(this.buttonOK); 230 | this.Controls.Add(this.listViewHighlights); 231 | this.Controls.Add(this.comboBoxAction); 232 | this.Controls.Add(this.labelThen); 233 | this.Controls.Add(this.comboBoxValue); 234 | this.Controls.Add(this.comboBoxRelation); 235 | this.Controls.Add(this.comboBoxColumn); 236 | this.Controls.Add(this.labelHighlight); 237 | this.MaximizeBox = false; 238 | this.MinimizeBox = false; 239 | this.Name = "FormHighlighting"; 240 | this.ShowIcon = false; 241 | this.Text = "PipeViewer Highlighting"; 242 | this.ResumeLayout(false); 243 | this.PerformLayout(); 244 | 245 | } 246 | 247 | #endregion 248 | 249 | private System.Windows.Forms.Label labelHighlight; 250 | private System.Windows.Forms.ComboBox comboBoxColumn; 251 | private System.Windows.Forms.ComboBox comboBoxRelation; 252 | private System.Windows.Forms.ComboBox comboBoxValue; 253 | private System.Windows.Forms.Label labelThen; 254 | private System.Windows.Forms.ComboBox comboBoxAction; 255 | private System.Windows.Forms.ListView listViewHighlights; 256 | private System.Windows.Forms.Button buttonOK; 257 | private System.Windows.Forms.Button buttonCancel; 258 | private System.Windows.Forms.Button buttonAdd; 259 | private System.Windows.Forms.Button buttonRemove; 260 | private System.Windows.Forms.ColumnHeader columnHeaderColumn; 261 | private System.Windows.Forms.ColumnHeader columnHeaderRelation; 262 | private System.Windows.Forms.ColumnHeader columnHeaderValue; 263 | private System.Windows.Forms.ColumnHeader columnHeaderAction; 264 | private System.Windows.Forms.Button buttonReset; 265 | private System.Windows.Forms.Button buttonApply; 266 | } 267 | } -------------------------------------------------------------------------------- /PipeViewer/FormHighlighting.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | using static System.Windows.Forms.ListViewItem; 4 | 5 | namespace PipeViewer 6 | { 7 | public delegate void highlightRowsEventHandler(ListView i_ListView); 8 | public partial class FormHighlighting : Form 9 | { 10 | public event highlightRowsEventHandler hightlightRowsUpdate; 11 | 12 | public FormHighlighting(ref ListView i_ListViewHighlighFilter) 13 | { 14 | InitializeComponentWrapper(); 15 | 16 | foreach (ListViewItem item in i_ListViewHighlighFilter.Items) 17 | { 18 | ListViewItem clonedItem = (ListViewItem)item.Clone(); 19 | this.listViewHighlights.Items.Add(clonedItem); 20 | } 21 | } 22 | 23 | private void InitializeComponentWrapper() 24 | { 25 | InitializeComponent(); 26 | this.comboBoxColumn.SelectedIndex = 0; 27 | this.comboBoxRelation.SelectedIndex = 0; 28 | this.comboBoxAction.SelectedIndex = 0; 29 | this.listViewHighlights.FullRowSelect = true; 30 | } 31 | 32 | 33 | // DUPLICATED function in ColumnFilter 34 | // Maybe create a shared function in Utils but it threw an exception for "type initializer" 35 | private bool isRowExist(string i_Column, string i_Relation, string i_Value, string i_Action) 36 | { 37 | bool isExist = false; 38 | string newRow = i_Column + i_Relation + i_Value + i_Action; 39 | foreach (ListViewItem item in listViewHighlights.Items) 40 | { 41 | string rawRow = ""; 42 | foreach (ListViewSubItem subItem in item.SubItems) 43 | { 44 | rawRow += subItem.Text; 45 | } 46 | 47 | if (newRow == rawRow) 48 | { 49 | isExist = true; 50 | break; 51 | } 52 | 53 | } 54 | 55 | return isExist; 56 | } 57 | 58 | private void buttonAdd_Click(object sender, EventArgs e) 59 | { 60 | if (!isRowExist(comboBoxColumn.Text, comboBoxRelation.Text, comboBoxValue.Text, comboBoxAction.Text) && !comboBoxValue.Text.Equals("")) 61 | { 62 | ListViewItem item = new ListViewItem(comboBoxColumn.Text); 63 | item.SubItems.Add(comboBoxRelation.Text); 64 | item.SubItems.Add(comboBoxValue.Text); 65 | item.SubItems.Add(comboBoxAction.Text); 66 | item.Checked = true; 67 | this.listViewHighlights.Items.Add(item); 68 | } 69 | } 70 | 71 | private void buttonCancel_Click(object sender, EventArgs e) 72 | { 73 | this.Close(); 74 | } 75 | 76 | private void buttonRemove_Click(object sender, EventArgs e) 77 | { 78 | foreach (ListViewItem item in this.listViewHighlights.SelectedItems) 79 | { 80 | item.Remove(); 81 | } 82 | } 83 | 84 | private void listViewHighlights_MouseDoubleClick(object sender, MouseEventArgs e) 85 | { 86 | foreach (ListViewItem item in ((ListView)sender).SelectedItems) 87 | { 88 | this.comboBoxColumn.Text = item.SubItems[0].Text; 89 | this.comboBoxRelation.Text = item.SubItems[1].Text; 90 | this.comboBoxValue.Text = item.SubItems[2].Text; 91 | this.comboBoxAction.Text = item.SubItems[3].Text; 92 | item.Remove(); 93 | } 94 | } 95 | 96 | public virtual void OnHighlightRowsUpdate(ListView i_ListView) 97 | { 98 | if (hightlightRowsUpdate != null) 99 | { 100 | hightlightRowsUpdate.Invoke(i_ListView); 101 | } 102 | } 103 | 104 | private void buttonOK_Click(object sender, EventArgs e) 105 | { 106 | buttonAdd_Click(sender, e); 107 | OnHighlightRowsUpdate(listViewHighlights); 108 | this.Close(); 109 | } 110 | 111 | private void buttonReset_Click(object sender, EventArgs e) 112 | { 113 | this.listViewHighlights.Clear(); 114 | } 115 | 116 | private void buttonApply_Click(object sender, EventArgs e) 117 | { 118 | buttonAdd_Click(sender, e); 119 | OnHighlightRowsUpdate(listViewHighlights); 120 | } 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /PipeViewer/FormHighlighting.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /PipeViewer/FormPipeProperties.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Text.RegularExpressions; 10 | using System.Windows.Forms; 11 | using System.Diagnostics; 12 | using System.Diagnostics.Tracing; 13 | 14 | namespace PipeViewer 15 | { 16 | public partial class PipePropertiesForm : Form 17 | { 18 | private Dictionary userPermissions = new Dictionary(); 19 | private ImageList userImageList; 20 | 21 | public class PermissionDetails 22 | { 23 | public string CanFull { get; set; } = ""; 24 | public string CanExecute{ get; set; } = ""; 25 | public string CanRead { get; set; } = ""; 26 | public string CanWrite { get; set; } = ""; 27 | public string CanSpecial { get; set; } = ""; 28 | 29 | } 30 | public PipePropertiesForm(Dictionary pipeData) 31 | { 32 | InitializeComponent(); 33 | // Initialize ImageList 34 | userImageList = new ImageList(); 35 | userImageList.Images.Add("user", Properties.Resources.User_icon_256_blue); 36 | listViewUsers.SmallImageList = userImageList; 37 | 38 | //General Tab 39 | lblName.Text = "Name: "; 40 | textBoxName.Text = pipeData["ColumnName"]; 41 | lblType.Text = "Type: "; 42 | textBoxType.Text = pipeData["ColumnPipeType"]; 43 | lblObjectAddress.Text = "Handle: "; 44 | textBoxObjectAddress.Text = pipeData["ColumnHandle"]; 45 | lblGrantedAccess.Text = "Granted Access: "; 46 | textBoxGrantedAccess.Text = pipeData["ColumnGrantedAccess"]; 47 | 48 | //Security Tab 49 | lblName2.Text = "Name: "; 50 | textBoxName2.Text = pipeData["ColumnName"]; 51 | ParsePermissions(pipeData["ColumnPermissions"]); 52 | PopulateUsersListView(); 53 | listViewUsers.SelectedIndexChanged += listViewUsers_SelectedIndexChanged; 54 | } 55 | 56 | private void ParsePermissions(string permissionsText) 57 | { 58 | if (string.IsNullOrEmpty(permissionsText)) 59 | { 60 | return; 61 | } 62 | string[] permissionEntries = permissionsText.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries); 63 | 64 | Regex regex = new Regex(@"(Allowed [^\s]+|Denied [^\s]+) (.+)", RegexOptions.IgnoreCase); 65 | 66 | foreach (string entry in permissionEntries) 67 | { 68 | string trimmedEntry = entry.Trim(); 69 | 70 | // Use Regex to match the pattern 71 | Match match = regex.Match(trimmedEntry); 72 | if (match.Success) 73 | { 74 | string permissionType = match.Groups[1].Value; // This captures "Allowed ___" or "Denied ___" 75 | string user = match.Groups[2].Value; // This captures the user name, handling spaces within names 76 | 77 | // Assign the permission type to the user in the dictionary 78 | // Initialize the list if the user doesn't already exist in the dictionary 79 | if (!userPermissions.ContainsKey(user)) 80 | { 81 | userPermissions[user] = new PermissionDetails(); 82 | } 83 | PermissionSetup(permissionType, user); 84 | } 85 | } 86 | } 87 | private void PopulateUsersListView() 88 | { 89 | listViewUsers.Items.Clear(); 90 | listViewUsers.View = View.List; 91 | 92 | // Add items to the ListView 93 | foreach (var user in userPermissions.Keys) 94 | { 95 | ListViewItem item = new ListViewItem(user); // Declare and initialize the item 96 | item.ImageKey = "user"; // Set the image key for the item 97 | listViewUsers.Items.Add(item); // Add the item to the ListView 98 | } 99 | 100 | // Auto resize columns to fit the content 101 | //listViewUsers.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); 102 | } 103 | 104 | 105 | private void listViewUsers_SelectedIndexChanged(object sender, EventArgs e) 106 | { 107 | if (listViewUsers.SelectedItems.Count > 0) 108 | { 109 | var selectedUser = listViewUsers.SelectedItems[0].Text; 110 | PopulatePermissionsListView(selectedUser); 111 | } 112 | } 113 | private void PermissionSetup(string permissionType, string user) 114 | { 115 | // Determine the new value based on the permission type 116 | string newValue; 117 | if (permissionType.Contains("Allowed")) 118 | { 119 | newValue = "true"; 120 | } 121 | else if (permissionType.Contains("Denied")) 122 | { 123 | newValue = "false"; 124 | } 125 | else 126 | { 127 | newValue = null; // Default to null if neither Allowed nor Denied 128 | } 129 | 130 | // Check and set permissions for Full, Read, Write, Execute, and Special 131 | if (permissionType.Contains("Full")) 132 | { 133 | userPermissions[user].CanFull = newValue; 134 | } 135 | if (permissionType.Contains("R")) 136 | { 137 | userPermissions[user].CanRead = newValue; 138 | } 139 | if (permissionType.Contains("W")) 140 | { 141 | userPermissions[user].CanWrite = newValue; 142 | } 143 | if (permissionType.Contains("X")) 144 | { 145 | userPermissions[user].CanExecute = newValue; 146 | } 147 | if (permissionType.Contains("Special")) 148 | { 149 | userPermissions[user].CanSpecial = newValue; 150 | } 151 | } 152 | 153 | private void PopulatePermissionsListView(string user) 154 | { 155 | // Clear all items from listViewPermissions and reset all checkboxes 156 | listViewPermissions.Items.Clear(); 157 | checkBoxAllowedFull.Checked = false; 158 | checkBoxAllowedRead.Checked = false; 159 | checkBoxAllowedWrite.Checked = false; 160 | checkBoxAllowedExecute.Checked = false; 161 | checkBoxAllowedSpecial.Checked = false; 162 | checkBoxDenyFull.Checked = false; 163 | checkBoxDenyRead.Checked = false; 164 | checkBoxDenyWrite.Checked = false; 165 | checkBoxDenyExecute.Checked = false; 166 | checkBoxDenySpecial.Checked = false; 167 | 168 | // Set checkboxes based on the permissions settings for the user 169 | SetCheckBox(checkBoxAllowedFull, checkBoxDenyFull, userPermissions[user].CanFull); 170 | SetCheckBox(checkBoxAllowedRead, checkBoxDenyRead, userPermissions[user].CanRead); 171 | SetCheckBox(checkBoxAllowedWrite, checkBoxDenyWrite, userPermissions[user].CanWrite); 172 | SetCheckBox(checkBoxAllowedExecute, checkBoxDenyExecute, userPermissions[user].CanExecute); 173 | SetCheckBox(checkBoxAllowedSpecial, checkBoxDenySpecial, userPermissions[user].CanSpecial); 174 | } 175 | 176 | private void SetCheckBox(CheckBox allowedCheckBox, CheckBox deniedCheckBox, string permissionValue) 177 | { 178 | if (permissionValue == "true") 179 | { 180 | allowedCheckBox.Checked = true; 181 | deniedCheckBox.Checked = false; 182 | } 183 | else if (permissionValue == "false") 184 | { 185 | deniedCheckBox.Checked = true; 186 | allowedCheckBox.Checked = false; 187 | } 188 | else // Handle null or empty string by ensuring both checkboxes are unchecked 189 | { 190 | allowedCheckBox.Checked = false; 191 | deniedCheckBox.Checked = false; 192 | } 193 | } 194 | 195 | } 196 | } 197 | -------------------------------------------------------------------------------- /PipeViewer/FormSearch.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace PipeViewer 2 | { 3 | partial class FormSearch 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.label1 = new System.Windows.Forms.Label(); 32 | this.comboBox1 = new System.Windows.Forms.ComboBox(); 33 | this.buttonFind = new System.Windows.Forms.Button(); 34 | this.buttonCancel = new System.Windows.Forms.Button(); 35 | this.groupBoxDirection = new System.Windows.Forms.GroupBox(); 36 | this.radioButtonDown = new System.Windows.Forms.RadioButton(); 37 | this.radioButtonUp = new System.Windows.Forms.RadioButton(); 38 | this.groupBoxDirection.SuspendLayout(); 39 | this.SuspendLayout(); 40 | // 41 | // label1 42 | // 43 | this.label1.AutoSize = true; 44 | this.label1.Location = new System.Drawing.Point(13, 13); 45 | this.label1.Name = "label1"; 46 | this.label1.Size = new System.Drawing.Size(56, 13); 47 | this.label1.TabIndex = 0; 48 | this.label1.Text = "Find what:"; 49 | // 50 | // comboBox1 51 | // 52 | this.comboBox1.FormattingEnabled = true; 53 | this.comboBox1.Location = new System.Drawing.Point(76, 13); 54 | this.comboBox1.Name = "comboBox1"; 55 | this.comboBox1.Size = new System.Drawing.Size(215, 21); 56 | this.comboBox1.TabIndex = 1; 57 | this.comboBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.comboBox1_KeyPress); 58 | // 59 | // buttonFind 60 | // 61 | this.buttonFind.Location = new System.Drawing.Point(314, 11); 62 | this.buttonFind.Name = "buttonFind"; 63 | this.buttonFind.Size = new System.Drawing.Size(75, 23); 64 | this.buttonFind.TabIndex = 2; 65 | this.buttonFind.Text = "Find Next"; 66 | this.buttonFind.UseVisualStyleBackColor = true; 67 | this.buttonFind.Click += new System.EventHandler(this.buttonFind_Click); 68 | // 69 | // buttonCancel 70 | // 71 | this.buttonCancel.Location = new System.Drawing.Point(314, 53); 72 | this.buttonCancel.Name = "buttonCancel"; 73 | this.buttonCancel.Size = new System.Drawing.Size(75, 23); 74 | this.buttonCancel.TabIndex = 3; 75 | this.buttonCancel.Text = "Cancel"; 76 | this.buttonCancel.UseVisualStyleBackColor = true; 77 | this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); 78 | // 79 | // groupBoxDirection 80 | // 81 | this.groupBoxDirection.Controls.Add(this.radioButtonDown); 82 | this.groupBoxDirection.Controls.Add(this.radioButtonUp); 83 | this.groupBoxDirection.Location = new System.Drawing.Point(178, 53); 84 | this.groupBoxDirection.Name = "groupBoxDirection"; 85 | this.groupBoxDirection.Size = new System.Drawing.Size(113, 63); 86 | this.groupBoxDirection.TabIndex = 4; 87 | this.groupBoxDirection.TabStop = false; 88 | this.groupBoxDirection.Text = "Direction"; 89 | // 90 | // radioButtonDown 91 | // 92 | this.radioButtonDown.AutoSize = true; 93 | this.radioButtonDown.Checked = true; 94 | this.radioButtonDown.Location = new System.Drawing.Point(52, 29); 95 | this.radioButtonDown.Name = "radioButtonDown"; 96 | this.radioButtonDown.Size = new System.Drawing.Size(53, 17); 97 | this.radioButtonDown.TabIndex = 1; 98 | this.radioButtonDown.TabStop = true; 99 | this.radioButtonDown.Text = "Down"; 100 | this.radioButtonDown.UseVisualStyleBackColor = true; 101 | // 102 | // radioButtonUp 103 | // 104 | this.radioButtonUp.AutoSize = true; 105 | this.radioButtonUp.Location = new System.Drawing.Point(7, 29); 106 | this.radioButtonUp.Name = "radioButtonUp"; 107 | this.radioButtonUp.Size = new System.Drawing.Size(39, 17); 108 | this.radioButtonUp.TabIndex = 0; 109 | this.radioButtonUp.Text = "Up"; 110 | this.radioButtonUp.UseVisualStyleBackColor = true; 111 | // 112 | // FormSearch 113 | // 114 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 115 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 116 | this.ClientSize = new System.Drawing.Size(415, 144); 117 | this.Controls.Add(this.groupBoxDirection); 118 | this.Controls.Add(this.buttonCancel); 119 | this.Controls.Add(this.buttonFind); 120 | this.Controls.Add(this.comboBox1); 121 | this.Controls.Add(this.label1); 122 | this.MaximizeBox = false; 123 | this.MinimizeBox = false; 124 | this.Name = "FormSearch"; 125 | this.ShowIcon = false; 126 | this.Text = "Find"; 127 | this.groupBoxDirection.ResumeLayout(false); 128 | this.groupBoxDirection.PerformLayout(); 129 | this.ResumeLayout(false); 130 | this.PerformLayout(); 131 | 132 | } 133 | 134 | #endregion 135 | 136 | private System.Windows.Forms.Label label1; 137 | private System.Windows.Forms.ComboBox comboBox1; 138 | private System.Windows.Forms.Button buttonFind; 139 | private System.Windows.Forms.Button buttonCancel; 140 | private System.Windows.Forms.GroupBox groupBoxDirection; 141 | private System.Windows.Forms.RadioButton radioButtonDown; 142 | private System.Windows.Forms.RadioButton radioButtonUp; 143 | } 144 | } -------------------------------------------------------------------------------- /PipeViewer/FormSearch.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace PipeViewer 5 | { 6 | public partial class FormSearch : Form 7 | { 8 | public delegate void searchEventHandler(string i_SearchString, bool i_SearchDown, bool i_MatchWholeWord, bool i_MatchSensitive); 9 | 10 | public event searchEventHandler searchForMatch; 11 | 12 | public FormSearch() 13 | { 14 | InitializeComponent(); 15 | } 16 | 17 | private void buttonCancel_Click(object sender, EventArgs e) 18 | { 19 | this.Close(); 20 | } 21 | 22 | public virtual void OnSearchForMatch(string i_SearchString, bool i_SearchDown, bool i_MatchWholeWord, bool i_MatchSensitive) 23 | { 24 | if (!isWordInComboBox(i_SearchString)) 25 | { 26 | comboBox1.Items.Add(i_SearchString); 27 | } 28 | 29 | if (searchForMatch != null) 30 | { 31 | searchForMatch.Invoke(i_SearchString, i_SearchDown, i_MatchWholeWord, i_MatchSensitive); 32 | } 33 | } 34 | 35 | private bool isWordInComboBox(string i_SearchString) 36 | { 37 | bool isInside = false; 38 | 39 | foreach (var item in comboBox1.Items) 40 | { 41 | if (i_SearchString.Equals(item.ToString())) 42 | { 43 | isInside = true; 44 | } 45 | } 46 | 47 | return isInside; 48 | } 49 | 50 | private void buttonFind_Click(object sender, EventArgs e) 51 | { 52 | OnSearchForMatch(comboBox1.Text, radioButtonDown.Checked, false, false); 53 | } 54 | 55 | private void comboBox1_KeyPress(object sender, KeyPressEventArgs e) 56 | { 57 | if (e.KeyChar == (char)Keys.Enter) 58 | { 59 | // Simulate a button click 60 | buttonFind.PerformClick(); 61 | e.Handled = true; 62 | } 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /PipeViewer/PermissionDialog.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | using System.IO; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace NamePipeViewer 7 | { 8 | 9 | // TODO: not used yet, it might help to create the properties windows to view the security of the pipes 10 | // and other details in a nice way. 11 | // https://stackoverflow.com/questions/28035464/how-does-one-invoke-the-windows-permissions-dialog-programmatically 12 | public static class PermissionDialog 13 | { 14 | public static bool Show(IntPtr hwndParent, string path) 15 | { 16 | if (path == null) 17 | throw new ArgumentNullException("path"); 18 | 19 | SafePidlHandle folderPidl; 20 | int hr; 21 | var a = Path.GetDirectoryName(path); 22 | hr = SHILCreateFromPath(Path.GetDirectoryName(path), out folderPidl, IntPtr.Zero); 23 | if (hr != 0) 24 | throw new Win32Exception(hr); 25 | 26 | SafePidlHandle filePidl; 27 | hr = SHILCreateFromPath(path, out filePidl, IntPtr.Zero); 28 | if (hr != 0) 29 | throw new Win32Exception(hr); 30 | 31 | IntPtr file = ILFindLastID(filePidl); 32 | 33 | System.Runtime.InteropServices.ComTypes.IDataObject ido; 34 | hr = SHCreateDataObject(folderPidl, 1, new IntPtr[] { file }, null, typeof(System.Runtime.InteropServices.ComTypes.IDataObject).GUID, out ido); 35 | if (hr != 0) 36 | throw new Win32Exception(hr); 37 | 38 | // if you get a 'no such interface' error here, make sure the running thread is STA 39 | IShellExtInit sei = (IShellExtInit)new SecPropSheetExt(); 40 | sei.Initialize(IntPtr.Zero, ido, IntPtr.Zero); 41 | 42 | IShellPropSheetExt spse = (IShellPropSheetExt)sei; 43 | IntPtr securityPage = IntPtr.Zero; 44 | spse.AddPages((p, lp) => 45 | { 46 | securityPage = p; 47 | return true; 48 | }, IntPtr.Zero); 49 | 50 | PROPSHEETHEADER psh = new PROPSHEETHEADER(); 51 | psh.dwSize = Marshal.SizeOf(psh); 52 | psh.hwndParent = hwndParent; 53 | psh.nPages = 1; 54 | psh.phpage = Marshal.AllocHGlobal(IntPtr.Size); 55 | Marshal.WriteIntPtr(psh.phpage, securityPage); 56 | 57 | // TODO: adjust title & icon here, also check out the available flags 58 | psh.pszCaption = "Permissions for '" + path + "'"; 59 | 60 | IntPtr res; 61 | try 62 | { 63 | res = PropertySheet(ref psh); 64 | } 65 | finally 66 | { 67 | Marshal.FreeHGlobal(psh.phpage); 68 | } 69 | return res == IntPtr.Zero; 70 | } 71 | 72 | private class SafePidlHandle : SafeHandle 73 | { 74 | public SafePidlHandle() 75 | : base(IntPtr.Zero, true) 76 | { 77 | } 78 | 79 | public override bool IsInvalid 80 | { 81 | get { return handle == IntPtr.Zero; } 82 | } 83 | 84 | protected override bool ReleaseHandle() 85 | { 86 | if (IsInvalid) 87 | return false; 88 | 89 | Marshal.FreeCoTaskMem(handle); 90 | return true; 91 | } 92 | } 93 | 94 | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] 95 | private struct PROPSHEETHEADER 96 | { 97 | public int dwSize; 98 | public int dwFlags; 99 | public IntPtr hwndParent; 100 | public IntPtr hInstance; 101 | public IntPtr hIcon; 102 | public string pszCaption; 103 | public int nPages; 104 | public IntPtr nStartPage; 105 | public IntPtr phpage; 106 | public IntPtr pfnCallback; 107 | } 108 | 109 | [DllImport("shell32.dll")] 110 | private static extern IntPtr ILFindLastID(SafePidlHandle pidl); 111 | 112 | [DllImport("shell32.dll", CharSet = CharSet.Unicode)] 113 | private static extern int SHILCreateFromPath(string pszPath, out SafePidlHandle ppidl, IntPtr rgflnOut); 114 | 115 | [DllImport("shell32.dll")] 116 | private static extern int SHCreateDataObject(SafePidlHandle pidlFolder, int cidl, IntPtr[] apidl, System.Runtime.InteropServices.ComTypes.IDataObject pdtInner, [MarshalAs(UnmanagedType.LPStruct)] Guid riid, out System.Runtime.InteropServices.ComTypes.IDataObject ppv); 117 | 118 | [DllImport("comctl32.dll", CharSet = CharSet.Unicode)] 119 | private static extern IntPtr PropertySheet(ref PROPSHEETHEADER lppsph); 120 | 121 | private delegate bool AddPropSheetPage(IntPtr page, IntPtr lParam); 122 | 123 | [ComImport] 124 | [Guid("1f2e5c40-9550-11ce-99d2-00aa006e086c")] // this GUID points to the property sheet handler for permissions 125 | private class SecPropSheetExt 126 | { 127 | } 128 | 129 | [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] 130 | [Guid("000214E8-0000-0000-C000-000000000046")] 131 | private interface IShellExtInit 132 | { 133 | void Initialize(IntPtr pidlFolder, System.Runtime.InteropServices.ComTypes.IDataObject pdtobj, IntPtr hkeyProgID); 134 | } 135 | 136 | [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] 137 | [Guid("000214E9-0000-0000-C000-000000000046")] 138 | private interface IShellPropSheetExt 139 | { 140 | void AddPages([MarshalAs(UnmanagedType.FunctionPtr)] AddPropSheetPage pfnAddPage, IntPtr lParam); 141 | void ReplacePage(); // not fully defined, we don't use it 142 | } 143 | } 144 | } 145 | -------------------------------------------------------------------------------- /PipeViewer/PipeViewer.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {2419CEDC-BF3A-4D8D-98F7-6403415BEEA4} 8 | WinExe 9 | PipeViewer 10 | PipeViewer 11 | v4.8 12 | 512 13 | true 14 | true 15 | 16 | 17 | 18 | AnyCPU 19 | true 20 | full 21 | false 22 | bin\Debug\ 23 | DEBUG;TRACE 24 | prompt 25 | 4 26 | 27 | 28 | AnyCPU 29 | pdbonly 30 | true 31 | bin\Release\ 32 | TRACE 33 | prompt 34 | 4 35 | 36 | 37 | 38 | ..\packages\Be.Windows.Forms.HexBox.1.6.1\lib\net40\Be.Windows.Forms.HexBox.dll 39 | 40 | 41 | ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll 42 | 43 | 44 | ..\NtApiDotNet.dll 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | Form 63 | 64 | 65 | ColumnSelection.cs 66 | 67 | 68 | 69 | Form 70 | 71 | 72 | Form1.cs 73 | 74 | 75 | Form 76 | 77 | 78 | FormPipeProperties.cs 79 | 80 | 81 | Form 82 | 83 | 84 | FormAbout.cs 85 | 86 | 87 | Form 88 | 89 | 90 | FormColumnFilter.cs 91 | 92 | 93 | Form 94 | 95 | 96 | FormHighlighting.cs 97 | 98 | 99 | Form 100 | 101 | 102 | FormSearch.cs 103 | 104 | 105 | 106 | Form 107 | 108 | 109 | PipeChat.cs 110 | 111 | 112 | 113 | 114 | True 115 | True 116 | Resources.resx 117 | 118 | 119 | 120 | ColumnSelection.cs 121 | 122 | 123 | Form1.cs 124 | 125 | 126 | FormAbout.cs 127 | 128 | 129 | FormColumnFilter.cs 130 | 131 | 132 | FormHighlighting.cs 133 | 134 | 135 | PipeChat.cs 136 | 137 | 138 | FormPipeProperties.cs 139 | 140 | 141 | ResXFileCodeGenerator 142 | Designer 143 | Resources.Designer.cs 144 | 145 | 146 | 147 | SettingsSingleFileGenerator 148 | Settings.Designer.cs 149 | 150 | 151 | True 152 | Settings.settings 153 | True 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | -------------------------------------------------------------------------------- /PipeViewer/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace PipeViewer 5 | { 6 | static class Program 7 | { 8 | /// 9 | /// The main entry point for the application. 10 | /// 11 | [STAThread] 12 | static void Main() 13 | { 14 | Application.EnableVisualStyles(); 15 | Application.SetCompatibleTextRenderingDefault(false); 16 | Application.Run(new Form1()); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /PipeViewer/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("PipeViewer")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("PipeViewer")] 13 | [assembly: AssemblyCopyright("Copyright © 2022")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("2419cedc-bf3a-4d8d-98f7-6403415beea4")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /PipeViewer/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace PipeViewer.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PipeViewer.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap connected { 67 | get { 68 | object obj = ResourceManager.GetObject("connected", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | 73 | /// 74 | /// Looks up a localized resource of type System.Drawing.Bitmap. 75 | /// 76 | internal static System.Drawing.Bitmap csv_export { 77 | get { 78 | object obj = ResourceManager.GetObject("csv_export", resourceCulture); 79 | return ((System.Drawing.Bitmap)(obj)); 80 | } 81 | } 82 | 83 | /// 84 | /// Looks up a localized resource of type System.Drawing.Bitmap. 85 | /// 86 | internal static System.Drawing.Bitmap disconnected { 87 | get { 88 | object obj = ResourceManager.GetObject("disconnected", resourceCulture); 89 | return ((System.Drawing.Bitmap)(obj)); 90 | } 91 | } 92 | 93 | /// 94 | /// Looks up a localized resource of type System.Drawing.Bitmap. 95 | /// 96 | internal static System.Drawing.Bitmap eraser { 97 | get { 98 | object obj = ResourceManager.GetObject("eraser", resourceCulture); 99 | return ((System.Drawing.Bitmap)(obj)); 100 | } 101 | } 102 | 103 | /// 104 | /// Looks up a localized resource of type System.Drawing.Bitmap. 105 | /// 106 | internal static System.Drawing.Bitmap export { 107 | get { 108 | object obj = ResourceManager.GetObject("export", resourceCulture); 109 | return ((System.Drawing.Bitmap)(obj)); 110 | } 111 | } 112 | 113 | /// 114 | /// Looks up a localized resource of type System.Drawing.Bitmap. 115 | /// 116 | internal static System.Drawing.Bitmap filter { 117 | get { 118 | object obj = ResourceManager.GetObject("filter", resourceCulture); 119 | return ((System.Drawing.Bitmap)(obj)); 120 | } 121 | } 122 | 123 | /// 124 | /// Looks up a localized resource of type System.Drawing.Bitmap. 125 | /// 126 | internal static System.Drawing.Bitmap find { 127 | get { 128 | object obj = ResourceManager.GetObject("find", resourceCulture); 129 | return ((System.Drawing.Bitmap)(obj)); 130 | } 131 | } 132 | 133 | /// 134 | /// Looks up a localized resource of type System.Drawing.Bitmap. 135 | /// 136 | internal static System.Drawing.Bitmap grid { 137 | get { 138 | object obj = ResourceManager.GetObject("grid", resourceCulture); 139 | return ((System.Drawing.Bitmap)(obj)); 140 | } 141 | } 142 | 143 | /// 144 | /// Looks up a localized resource of type System.Drawing.Bitmap. 145 | /// 146 | internal static System.Drawing.Bitmap grid_disable { 147 | get { 148 | object obj = ResourceManager.GetObject("grid-disable", resourceCulture); 149 | return ((System.Drawing.Bitmap)(obj)); 150 | } 151 | } 152 | 153 | /// 154 | /// Looks up a localized resource of type System.Drawing.Bitmap. 155 | /// 156 | internal static System.Drawing.Bitmap group_icon { 157 | get { 158 | object obj = ResourceManager.GetObject("group_icon", resourceCulture); 159 | return ((System.Drawing.Bitmap)(obj)); 160 | } 161 | } 162 | 163 | /// 164 | /// Looks up a localized resource of type System.Drawing.Bitmap. 165 | /// 166 | internal static System.Drawing.Bitmap highlighter { 167 | get { 168 | object obj = ResourceManager.GetObject("highlighter", resourceCulture); 169 | return ((System.Drawing.Bitmap)(obj)); 170 | } 171 | } 172 | 173 | /// 174 | /// Looks up a localized resource of type System.Drawing.Bitmap. 175 | /// 176 | internal static System.Drawing.Bitmap import { 177 | get { 178 | object obj = ResourceManager.GetObject("import", resourceCulture); 179 | return ((System.Drawing.Bitmap)(obj)); 180 | } 181 | } 182 | 183 | /// 184 | /// Looks up a localized resource of type System.Drawing.Bitmap. 185 | /// 186 | internal static System.Drawing.Bitmap loading { 187 | get { 188 | object obj = ResourceManager.GetObject("loading", resourceCulture); 189 | return ((System.Drawing.Bitmap)(obj)); 190 | } 191 | } 192 | 193 | /// 194 | /// Looks up a localized resource of type System.Drawing.Bitmap. 195 | /// 196 | internal static System.Drawing.Bitmap permission { 197 | get { 198 | object obj = ResourceManager.GetObject("permission", resourceCulture); 199 | return ((System.Drawing.Bitmap)(obj)); 200 | } 201 | } 202 | 203 | /// 204 | /// Looks up a localized resource of type System.Drawing.Bitmap. 205 | /// 206 | internal static System.Drawing.Bitmap permission_disable { 207 | get { 208 | object obj = ResourceManager.GetObject("permission_disable", resourceCulture); 209 | return ((System.Drawing.Bitmap)(obj)); 210 | } 211 | } 212 | 213 | /// 214 | /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). 215 | /// 216 | internal static System.Drawing.Icon pipeviewer_logo { 217 | get { 218 | object obj = ResourceManager.GetObject("pipeviewer_logo", resourceCulture); 219 | return ((System.Drawing.Icon)(obj)); 220 | } 221 | } 222 | 223 | /// 224 | /// Looks up a localized resource of type System.Drawing.Bitmap. 225 | /// 226 | internal static System.Drawing.Bitmap recieve { 227 | get { 228 | object obj = ResourceManager.GetObject("recieve", resourceCulture); 229 | return ((System.Drawing.Bitmap)(obj)); 230 | } 231 | } 232 | 233 | /// 234 | /// Looks up a localized resource of type System.Drawing.Bitmap. 235 | /// 236 | internal static System.Drawing.Bitmap refresh { 237 | get { 238 | object obj = ResourceManager.GetObject("refresh", resourceCulture); 239 | return ((System.Drawing.Bitmap)(obj)); 240 | } 241 | } 242 | 243 | /// 244 | /// Looks up a localized resource of type System.Drawing.Bitmap. 245 | /// 246 | internal static System.Drawing.Bitmap search__2_ { 247 | get { 248 | object obj = ResourceManager.GetObject("search (2)", resourceCulture); 249 | return ((System.Drawing.Bitmap)(obj)); 250 | } 251 | } 252 | 253 | /// 254 | /// Looks up a localized resource of type System.Drawing.Bitmap. 255 | /// 256 | internal static System.Drawing.Bitmap send { 257 | get { 258 | object obj = ResourceManager.GetObject("send", resourceCulture); 259 | return ((System.Drawing.Bitmap)(obj)); 260 | } 261 | } 262 | 263 | /// 264 | /// Looks up a localized resource of type System.Drawing.Bitmap. 265 | /// 266 | internal static System.Drawing.Bitmap send__button_icon_small { 267 | get { 268 | object obj = ResourceManager.GetObject("send__button_icon_small", resourceCulture); 269 | return ((System.Drawing.Bitmap)(obj)); 270 | } 271 | } 272 | 273 | /// 274 | /// Looks up a localized resource of type System.Drawing.Bitmap. 275 | /// 276 | internal static System.Drawing.Bitmap startIcon { 277 | get { 278 | object obj = ResourceManager.GetObject("startIcon", resourceCulture); 279 | return ((System.Drawing.Bitmap)(obj)); 280 | } 281 | } 282 | 283 | /// 284 | /// Looks up a localized resource of type System.Drawing.Bitmap. 285 | /// 286 | internal static System.Drawing.Bitmap User_icon_256_blue { 287 | get { 288 | object obj = ResourceManager.GetObject("User_icon_256_blue", resourceCulture); 289 | return ((System.Drawing.Bitmap)(obj)); 290 | } 291 | } 292 | } 293 | } 294 | -------------------------------------------------------------------------------- /PipeViewer/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | ..\Resources\highlighter.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | 125 | ..\Resources\left-arrow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 126 | 127 | 128 | ..\Resources\permission-disable.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 129 | 130 | 131 | ..\Resources\loading.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 132 | 133 | 134 | ..\Resources\import.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 135 | 136 | 137 | ..\Resources\link.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 138 | 139 | 140 | ..\Resources\send (2).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 141 | 142 | 143 | ..\Resources\search (2).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 144 | 145 | 146 | ..\Resources\pipeviewer_logo.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 147 | 148 | 149 | ..\Resources\export.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 150 | 151 | 152 | ..\Resources\find.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 153 | 154 | 155 | ..\Resources\csv_export.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 156 | 157 | 158 | ..\Resources\refresh.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 159 | 160 | 161 | ..\Resources\unlinked-custom.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 162 | 163 | 164 | ..\Resources\right-arrow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 165 | 166 | 167 | ..\Resources\grid.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 168 | 169 | 170 | ..\Resources\eraser.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 171 | 172 | 173 | ..\Resources\filter.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 174 | 175 | 176 | ..\Resources\grid-disable.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 177 | 178 | 179 | ..\Resources\startIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 180 | 181 | 182 | ..\Resources\permission.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 183 | 184 | 185 | ..\Resources\group-icon.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 186 | 187 | 188 | ..\Resources\User-icon-256-blue.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 189 | 190 | -------------------------------------------------------------------------------- /PipeViewer/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace PipeViewer.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /PipeViewer/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PipeViewer/ResizableTextBoxControl.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /PipeViewer/Resources/Info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/Info.png -------------------------------------------------------------------------------- /PipeViewer/Resources/Lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/Lock.png -------------------------------------------------------------------------------- /PipeViewer/Resources/User-icon-256-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/User-icon-256-blue.png -------------------------------------------------------------------------------- /PipeViewer/Resources/connected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/connected.png -------------------------------------------------------------------------------- /PipeViewer/Resources/csv_export.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/csv_export.png -------------------------------------------------------------------------------- /PipeViewer/Resources/eraser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/eraser.png -------------------------------------------------------------------------------- /PipeViewer/Resources/export.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/export.png -------------------------------------------------------------------------------- /PipeViewer/Resources/filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/filter.png -------------------------------------------------------------------------------- /PipeViewer/Resources/find.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/find.png -------------------------------------------------------------------------------- /PipeViewer/Resources/grid-disable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/grid-disable.png -------------------------------------------------------------------------------- /PipeViewer/Resources/grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/grid.png -------------------------------------------------------------------------------- /PipeViewer/Resources/group-icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/group-icon.jpg -------------------------------------------------------------------------------- /PipeViewer/Resources/highlighter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/highlighter.png -------------------------------------------------------------------------------- /PipeViewer/Resources/import.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/import.png -------------------------------------------------------------------------------- /PipeViewer/Resources/left-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/left-arrow.png -------------------------------------------------------------------------------- /PipeViewer/Resources/link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/link.png -------------------------------------------------------------------------------- /PipeViewer/Resources/loading.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/loading.bmp -------------------------------------------------------------------------------- /PipeViewer/Resources/loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/loading.png -------------------------------------------------------------------------------- /PipeViewer/Resources/no-connection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/no-connection.png -------------------------------------------------------------------------------- /PipeViewer/Resources/permission-disable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/permission-disable.png -------------------------------------------------------------------------------- /PipeViewer/Resources/permission.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/permission.png -------------------------------------------------------------------------------- /PipeViewer/Resources/pipeviewer_logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/pipeviewer_logo.ico -------------------------------------------------------------------------------- /PipeViewer/Resources/recieve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/recieve.png -------------------------------------------------------------------------------- /PipeViewer/Resources/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/refresh.png -------------------------------------------------------------------------------- /PipeViewer/Resources/right-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/right-arrow.png -------------------------------------------------------------------------------- /PipeViewer/Resources/search (2).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/search (2).png -------------------------------------------------------------------------------- /PipeViewer/Resources/send (2).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/send (2).png -------------------------------------------------------------------------------- /PipeViewer/Resources/send.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/send.png -------------------------------------------------------------------------------- /PipeViewer/Resources/startIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/startIcon.png -------------------------------------------------------------------------------- /PipeViewer/Resources/unlinked-custom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/unlinked-custom.png -------------------------------------------------------------------------------- /PipeViewer/Resources/userIcon.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/userIcon.bmp -------------------------------------------------------------------------------- /PipeViewer/Resources/user_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/PipeViewer/Resources/user_icon.ico -------------------------------------------------------------------------------- /PipeViewer/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /PipeViewerShellV1.0.ps1: -------------------------------------------------------------------------------- 1 | # Installing the Module - Do it before your first run. 2 | #Install-Module -Name NtObjectManager -RequiredVersion 1.1.32 3 | 4 | # To allow the execution of local scripts and scripts signed by a trusted publisher. 5 | #Set-ExecutionPolicy RemoteSigned 6 | 7 | function Invoke-PipeViewer { 8 | <# 9 | .SYNOPSIS 10 | A PowerShell script to gather detailed information about named pipes on the system and export it to JSON format. 11 | .DESCRIPTION 12 | This script uses the NtObjectManager module to create a JSON file that can be imported into the PipeViewer, a CyberArk open source tool, 13 | to display detailed information about named pipes. 14 | .AUTHOR 15 | Noam Regev 16 | .COMPANY 17 | CyberArk Software Ltd. 18 | https://github.com/cyberark/pipeviewer 19 | #> 20 | 21 | param ( 22 | [switch]$Print, # Switch to control output display 23 | [switch]$Export, # Switch to control exporting to JSON 24 | [string]$fileName = "NamedPipes.json", # Optional filename, default name - NamedPipes.json 25 | [switch]$Help # Switch to display help information 26 | ) 27 | 28 | # Check if no switches are provided 29 | if ($PSBoundParameters.Count -eq 0) { 30 | $Help = $true 31 | } 32 | 33 | # Display usage information if -Help switch is used 34 | if ($Help) { 35 | $helpText = @" 36 | _____ _ __ ___ 37 | | __ (_) \ \ / (_) 38 | | |__) | _ __ __\ \ / / _ _____ _____ _ __ 39 | | ___/ | '_ \ / _ \ \/ / | |/ _ \ \ /\ / / _ \ '__| 40 | | | | | |_) | __/\ / | | __/\ V V / __/ | 41 | |_| |_| .__/_\___| \/ |_|\___| \_/\_/ \___|_| 42 | | | / ____| | | | | 43 | |_|| (___ | |__ ___| | | 44 | \___ \| '_ \ / _ \ | | 45 | ____) | | | | __/ | | 46 | |_____/|_| |_|\___|_|_| v1.0 47 | 48 | Author: Noam Regev 49 | Version: 1.0 50 | Company: CyberArk Software Ltd. 51 | Contributors: Eviatar Gerzi 52 | 53 | vvv PipeViewer GUI Version GitHub Link vvv 54 | GitHub: https://github.com/cyberark/pipeviewer 55 | 56 | Usage: 57 | Invoke-PipeViewer -Help 58 | Display this help information. 59 | Invoke-PipeViewer -Print 60 | Print the output to the console. 61 | Invoke-PipeViewer -Export [FileName] 62 | Export the output to JSON file with the specified name or 'NamedPipes.json' by default, 63 | the json file can be imported by the PipeViewer non-shell version. 64 | 65 | Examples: 66 | # Print the named pipes details to the console. 67 | Invoke-PipeViewer -Print 68 | 69 | # Export the named pipes details to the given path with the name provided as a JSON file. 70 | Invoke-PipeViewer -Export "C:\Path\To\CustomName2.json" 71 | 72 | # Print the named pipes and export it to current directory. 73 | Invoke-PipeViewer -Print -Export "CustomName1.json" 74 | "@ 75 | Write-Host $helpText 76 | return 77 | } 78 | 79 | # Import the required module 80 | Import-Module NtObjectManager 81 | 82 | function ConvertAccessMaskToSimplePermissions { 83 | param ( 84 | [Parameter(Mandatory=$true)] 85 | $AccessMask 86 | ) 87 | 88 | switch ($AccessMask) { 89 | 2032127 { return "Full" } # 001F01FF 90 | 1245631 { return "RWX" } # 001301BF 91 | 1180095 { return "RWX" } # 001201BF 92 | 1180063 { return "RW" } # 0012019F 93 | 1048854 { return "W" } # 00100116 94 | 1179817 { return "RX" } # 001200A9 95 | 1180059 { return "R" } # 0012019B 96 | default { return "(special)" } 97 | } 98 | } 99 | 100 | function ConvertSidToName { 101 | param ( 102 | [string]$sid 103 | ) 104 | try { 105 | $account = New-Object System.Security.Principal.SecurityIdentifier($sid) 106 | $account.Translate([System.Security.Principal.NTAccount]).Value 107 | } catch { 108 | $sid # Return SID if translation fails 109 | } 110 | } 111 | 112 | $processPIDsDictionary = @{} 113 | 114 | function ProcessNameWithProcessPIDs { 115 | param ( 116 | [NtApiDotNet.NtNamedPipeFileBase]$PipeObj 117 | ) 118 | $processIds = $PipeObj.GetUsingProcessIds() 119 | $processNames = @() 120 | foreach ($curPid in $processIds) { 121 | if ($processPIDsDictionary.ContainsKey($curPid)) { 122 | $processNames += "$($processPIDsDictionary[$curPid]) ($curPid)" 123 | } else { 124 | try { 125 | $process = [System.Diagnostics.Process]::GetProcessById($curPid) 126 | $processPIDsDictionary[$curPid] = $process.ProcessName 127 | $processNames += "$($process.ProcessName) ($curPid)" 128 | } catch { 129 | $processPIDsDictionary[$curPid] = "" 130 | $processNames += " ($curPid)" 131 | } 132 | } 133 | } 134 | return $processNames -join "; " 135 | } 136 | 137 | # Define the Get-NamedPipeDetails function 138 | function Get-NamedPipeDetails { 139 | param ( 140 | [string]$PipeName 141 | ) 142 | try { 143 | $pipeObj = Get-NtFile -Path $PipeName -Win32Path 144 | $owner = ConvertSidToName $pipeObj.SecurityDescriptor.Owner.Sid 145 | $integrityLevel = $pipeObj.SecurityDescriptor.MandatoryLabel.IntegrityLevel 146 | $clientPID = ProcessNameWithProcessPIDs -PipeObj $pipeObj 147 | $pipeType = $pipeObj.PipeType.ToString() 148 | $configuration = $pipeObj.Configuration.ToString() 149 | $readMode = $pipeObj.ReadMode.ToString() 150 | $numberOfLinks = $pipeObj.NumberOfLinks 151 | $directoryGrantedAccess = $pipeObj.DirectoryGrantedAccess.ToString() #Getting More Information then We Get From the PipeViewer! 152 | $grantedAccessString = $pipeObj.GrantedAccess.ToString() #Getting More Information then We Get in the PipeViewer! 153 | $grantedAccessGeneric = $pipeObj.GrantedAccessGeneric.ToString() #Getting More Information then We Get in the PipeViewer! 154 | $endpointType = $pipeObj.EndPointType.ToString() 155 | $creationTime = $pipeObj.CreationTime.ToString("o") 156 | $handle = $pipeObj.Handle.ToString() 157 | 158 | # Format the permissions 159 | $permissionsFormatted = ($pipeObj.SecurityDescriptor.Dacl | ForEach-Object { 160 | $trusteeName = ConvertSidToName -sid $_.Sid 161 | $permissionString = ConvertAccessMaskToSimplePermissions -AccessMask $_.Mask 162 | "Allowed $permissionString $trusteeName" 163 | }) -join "; `n" 164 | 165 | $details = [PSCustomObject]@{ 166 | Name = $PipeName 167 | IntegrityLevel = $integrityLevel 168 | Permissions = $permissionsFormatted 169 | ClientPID = $clientPID 170 | PipeType = $pipeType 171 | Configuration = $configuration 172 | ReadMode = $readMode 173 | NumberOfLinks = $numberOfLinks 174 | DirectoryGrantedAccess = $directoryGrantedAccess 175 | GrantedAccess = $grantedAccessString 176 | GrantedAccessGeneric = $grantedAccessGeneric 177 | CreationTime = $creationTime 178 | OwnerName = $owner 179 | EndPointType = $endpointType 180 | Handle = $handle 181 | } 182 | return $details 183 | } catch { 184 | # When there is no Access add the Pipe with null arguments. 185 | return [PSCustomObject]@{ 186 | Name = $PipeName 187 | IntegrityLevel = $null 188 | Permissions = $null 189 | ClientPID = $null 190 | PipeType = $null 191 | Configuration = $null 192 | ReadMode = $null 193 | NumberOfLinks = $null 194 | DirectoryGrantedAccess = $null 195 | GrantedAccess = $null 196 | GrantedAccessGeneric = $null 197 | CreationTime = $null 198 | OwnerName = $null 199 | EndPointType = $null 200 | Handle = $null 201 | } 202 | } 203 | } 204 | 205 | function Get-NamedPipes { 206 | [System.IO.Directory]::GetFiles("\\.\pipe\") 207 | } 208 | 209 | # Main execution block 210 | $namedPipes = Get-NamedPipes 211 | $pipeDetailsList = @() 212 | foreach ($pipe in $namedPipes) { 213 | try { 214 | $pipeDetails = Get-NamedPipeDetails -PipeName $pipe 215 | if ($pipeDetails -ne $null) { 216 | $pipeDetailsList += $pipeDetails 217 | } 218 | } catch { 219 | Write-Error "Skipping pipe $pipe due to error: $_" 220 | } 221 | } 222 | 223 | if ($Print) { 224 | $pipeDetailsList | Format-List 225 | } 226 | 227 | if ($Export) { 228 | $fileName = if ($FileName -eq "NamedPipes.json" -and $Export -ne $true) { $Export } else { $FileName } 229 | $outputPath = if ($fileName.Contains("\") -or $fileName.Contains("/")) { $fileName } else { Join-Path -Path (Get-Location) -ChildPath $fileName } 230 | $pipeDetailsList | ConvertTo-Json | Out-File -FilePath $outputPath 231 | Write-Host "Details exported to '$outputPath'" 232 | } 233 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![GitHub release][release-img]][release] 2 | [![License][license-img]][license] 3 | ![Downloads][download] 4 | 5 | 6 | A GUI tool for viewing Windows Named Pipes and searching for insecure permissions. 7 | 8 | The tool was published as part of a research about Docker named pipes: 9 | ["Breaking Docker Named Pipes SYSTEMatically: Docker Desktop Privilege Escalation – Part 1"](https://www.cyberark.com/resources/threat-research-blog/breaking-docker-named-pipes-systematically-docker-desktop-privilege-escalation-part-1) 10 | ["Breaking Docker Named Pipes SYSTEMatically: Docker Desktop Privilege Escalation – Part 2"](https://www.cyberark.com/resources/threat-research-blog/breaking-docker-named-pipes-systematically-docker-desktop-privilege-escalation-part-2) 11 | 12 | ## Overview 13 | PipeViewer is a GUI tool that allows users to view details about Windows Named pipes and their permissions. It is designed to be useful for security researchers who are interested in searching for named pipes with weak permissions or testing the security of named pipes. With PipeViewer, users can easily view and analyze information about named pipes on their systems, helping them to identify potential security vulnerabilities and take appropriate steps to secure their systems. 14 | 15 | ## Usage 16 | 17 | Double-click the EXE binary and you will get the list of all named pipes. 18 | 19 | ## Build 20 | Build the PipeViewer project using Visual Studio or the command line. Here's how: 21 | ### Using Visual Studio 22 | Open `PipeViewer.sln` in Visual Studio. 23 | Navigate to Build > Batch Build > Select "Release" for PipeViewer and click `Build`. 24 | ### Using Command Line 25 | Open a Command Prompt and navigate to your project directory. 26 | ```bash 27 | cd path\to\PipeViewer 28 | msbuild PipeViewer.sln /p:Configuration=Release /p:Platform="Any CPU" 29 | ``` 30 | - Make sure that MSBuild is added to your system's PATH or provide the full path to the MSBuild executable. 31 | 32 | The executable will be created in: 'C:\path\to\PipeViewer\PipeViewer\bin\Release'. 33 | 34 | When downloading it from GitHub you might get error of block files, you can use PowerShell to unblock them: 35 | ```powershell 36 | Get-ChildItem -Path 'D:\tmp\PipeViewer-main' -Recurse | Unblock-File 37 | ``` 38 | 39 | ## Warning 40 | We built the project and uploaded it so you can find it in the releases. 41 | One problem is that the binary will trigger alerts from Windows Defender because it uses the NtObjerManager package which is flagged as virus. 42 | Note that James Forshaw talked about it [here](https://youtu.be/At-SWQyp-DY?t=1652). 43 | We can't change it because we depend on third-party DLL. 44 | 45 | ## Features 46 | * A detailed overview of named pipes. 47 | * Filter\highlight rows based on cells. 48 | * Bold specific rows. 49 | * Export\Import to\from JSON. 50 | * PipeChat - create a connection with available named pipes. 51 | 52 | ## Demo 53 | https://user-images.githubusercontent.com/11998736/215425682-c5219395-16ea-42e9-8d1e-a636771b5ba2.mp4 54 | 55 | ## Credit 56 | We want to thank James Forshaw ([@tyranid](https://github.com/tyranid)) for creating the open source [NtApiDotNet](https://github.com/googleprojectzero/sandbox-attacksurface-analysis-tools/tree/main/NtApiDotNet) which allowed us to get information about named pipes. 57 | 58 | ## License 59 | Copyright (c) 2023 CyberArk Software Ltd. All rights reserved 60 | This repository is licensed under Apache-2.0 License - see [`LICENSE`](LICENSE) for more details. 61 | 62 | ## ❤️ Showcase 63 | * Presented at Insomnihack 2023 ["Breaking Docker's Named Pipes SYSTEMatically"](https://www.youtube.com/watch?v=03z6o_YOw8M) 64 | * Presented at TyphoonCon 2023 ["Breaking Docker's Named Pipes SYSTEMatically"](https://typhooncon.com/breaking-dockers-pipes/) 65 | * A case study by Nir Chako while using Pipeviewer ["Piping Hot Fortinet VCulnerabilities"](https://pentera.io/resources/research/two-zero-days-forticlient-vpn-2024/) 66 | 67 | ## References 68 | For more comments, suggestions or questions, you can contact Eviatar Gerzi ([@g3rzi](https://twitter.com/g3rzi)) and CyberArk Labs. 69 | 70 | [release-img]: https://img.shields.io/github/release/cyberark/PipeViewer.svg 71 | [release]: https://github.com/cyberark/PipeViewer/releases 72 | 73 | [license-img]: https://img.shields.io/github/license/cyberark/PipeViewer.svg 74 | [license]: https://github.com/cyberark/PipeViewer/blob/master/LICENSE 75 | 76 | [download]: https://img.shields.io/github/downloads/cyberark/PipeViewer/total?logo=github 77 | -------------------------------------------------------------------------------- /Tests/NamedPipeServer.ps1: -------------------------------------------------------------------------------- 1 | Write-Host "pipe server" 2 | $count = 0 3 | $pipeName = "Foo" 4 | 5 | $pipe = New-Object System.IO.Pipes.NamedPipeServerStream($pipeName, [System.IO.Pipes.PipeDirection]::InOut, 1, [System.IO.Pipes.PipeTransmissionMode]::Message, [System.IO.Pipes.PipeOptions]::None) 6 | 7 | try { 8 | Write-Host "waiting for client" 9 | $pipe.WaitForConnection() 10 | Write-Host "got client" 11 | 12 | while ($true) { 13 | Write-Host "writing message #$count" 14 | 15 | # Read data from the client 16 | $readBuffer = New-Object byte[] 1024 17 | $bytesRead = $pipe.Read($readBuffer, 0, $readBuffer.Length) 18 | $receivedData = [System.Text.Encoding]::ASCII.GetString($readBuffer, 0, $bytesRead) 19 | Write-Host $receivedData 20 | 21 | # Convert data to uppercase 22 | $responseData = $receivedData.ToUpper() 23 | 24 | # Write data to the client 25 | $responseBytes = [System.Text.Encoding]::ASCII.GetBytes($responseData) 26 | try { 27 | $pipe.Write($responseBytes, 0, $responseBytes.Length) 28 | $pipe.Flush() 29 | } catch [System.Exception] { 30 | Write-Host "connection was lost" 31 | $pipe.Dispose() 32 | $pipe = New-Object System.IO.Pipes.NamedPipeServerStream($pipeName, [System.IO.Pipes.PipeDirection]::InOut, 1, [System.IO.Pipes.PipeTransmissionMode]::Message, [System.IO.Pipes.PipeOptions]::None) 33 | Write-Host "waiting for client" 34 | $pipe.WaitForConnection() 35 | Write-Host "got client 2" 36 | } 37 | 38 | $count++ 39 | Start-Sleep -Seconds 2 40 | } 41 | } catch [system.ArgumentNullException], [system.InvalidOperationException], [system.InvalidOperationException], [system.ObjectDisposedException] { 42 | Write-Host $_.ScriptStackTrace 43 | } 44 | finally { 45 | $pipe.Dispose() 46 | } -------------------------------------------------------------------------------- /Tests/OLDNamedPipeServer.ps1: -------------------------------------------------------------------------------- 1 | Write-Host "pipe server" 2 | $count = 0 3 | $pipeName = "Foo" 4 | 5 | $pipe = New-Object System.IO.Pipes.NamedPipeServerStream($pipeName, [System.IO.Pipes.PipeDirection]::InOut, 1, [System.IO.Pipes.PipeTransmissionMode]::Message, [System.IO.Pipes.PipeOptions]::None) 6 | 7 | try { 8 | Write-Host "waiting for client" 9 | $pipe.WaitForConnection() 10 | Write-Host "got client" 11 | 12 | while ($true) { 13 | Write-Host "writing message $count" 14 | 15 | # Read data from the client 16 | $readBuffer = New-Object byte[] 1024 17 | $bytesRead = $pipe.Read($readBuffer, 0, $readBuffer.Length) 18 | $receivedData = [System.Text.Encoding]::ASCII.GetString($readBuffer, 0, $bytesRead) 19 | Write-Host $receivedData 20 | 21 | # Convert data to uppercase 22 | $responseData = $receivedData.ToUpper() 23 | 24 | # Write data to the client 25 | $responseBytes = [System.Text.Encoding]::ASCII.GetBytes($responseData) 26 | $pipe.Write($responseBytes, 0, $responseBytes.Length) 27 | $pipe.Flush() 28 | 29 | $count++ 30 | Start-Sleep -Seconds 2 31 | } 32 | } 33 | finally { 34 | $pipe.Dispose() 35 | } -------------------------------------------------------------------------------- /packages/Be.Windows.Forms.HexBox.1.6.1/Be.Windows.Forms.HexBox.1.6.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/packages/Be.Windows.Forms.HexBox.1.6.1/Be.Windows.Forms.HexBox.1.6.1.nupkg -------------------------------------------------------------------------------- /packages/Be.Windows.Forms.HexBox.1.6.1/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2011 Bernhard Elbl 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /packages/Be.Windows.Forms.HexBox.1.6.1/lib/net40/Be.Windows.Forms.HexBox.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyberark/PipeViewer/9ed84dc719fe920564b3c4b788a2978bcd9a10dd/packages/Be.Windows.Forms.HexBox.1.6.1/lib/net40/Be.Windows.Forms.HexBox.dll --------------------------------------------------------------------------------