Skip to content

JanosKrizsan/Most_Valuable_Player

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 

Repository files navigation

MVP

Passport

What is this

A C# WinForms app that could use the PS scripts included. Partial implementation, this is a project to showcase a possible WinForms MVP structure. This showcase-project is now deemed finished by the author.

Tech Used

  • PS
  • C#
  • WinForms

Structure

PS Scripts

These are ran via C#:
The C# desktop app runs various PS scripts to change states, connect to services and apply changes to the environment.

  • Connect to VPN
  • Connect to Proxy
  • Connect to RDP
  • Spoof Mac Address
  • Change Sys Language
  • Change IP

Additional:

  • Force scripts to run in elevated mode
  • Notification of system language and location language
  • Password choices, encrypted saving
  • PS scripts are protected

C# Core

  • Transfers and uses data
  • Encrypts and saves user data
  • Sends e-mail of reports
  • Runs PS scripts
  • Error Handling via C#

WinForms

  • Understanding is 80% of the battle here
  • Refactored Designer code

Windows

Login / Register:

  • Adds users
  • Logs in to Main Menu

Main Menu:

  • Is a hub for the rest of the windows
  • Textbox provides updates of operation
  • Current operation status is shown below textbox
  • Scripts can be run, added and removed (except basic ones)
  • Current operation can be stopped
  • Reports can be saved to XML, CSV or simple Text file
  • Current report can be wiped and reset
  • Windows that can be opened are:
    • Options
    • VPN
    • Proxy
    • RDP
    • MAC
    • IP

Settings:

  • Setting up User Data to be saved, deleted, we can add users here if we are an admin
  • Setting up operational mechanisms
  • Setting up e-mail to send to, can enforce e-mail PGP encryption

Negatives so far:

  • Will be a lot of code-deletion later, because some of the auto-generated will not be needed.
  • My design skills.

Positives:

  • Comfy editor.
  • Straightforward generated code
  • Not that different from WPF

Note: I could structure it within a tab controller but I'm not really sure that would be the best application-design for this. It might become too beefy due to that and less clear.

Development and Testing

Development

  • In VS Community and VS Code
  • Separation of parts in Version Control
  • Refactoring of the designer generated code

Note:
The refactoring the designer generated code is not advised normally, as it might cause non-errors to appear. Either better to write the WinForms code yourself, or rely on the designer to do so.

Testing

  • Will either need a VM or an RDP to test the scripts without rendering your computer useless

Resources / Info / Documentation

PS Networking

VPN Protocols
Set IP Basics
Set IP In-Depth
Set Static & DHCP Part 1
Set Static & DHCP Part 2
IP Spoofing is Hard
WMI
Powershell Operators
IPV4
IPV6
Powershell Sweeps
Cmdlet Writing

WinForms

Possible Way to Access Control
Winforms Structure Hints
Generated Code
MVVM
General Practices
Best Practices
Custom Controls
Winforms Tutorial MVP
More MVP
MVP Example MVP MVC Winforms Controls
MVP Video Series

PGP

PGP File Encryption
More File Encryption
In General

.NET

Secure String
Secure String in C#
Encrypting Data
Encrypting Files
AES Encryptiong
Zip Files
Zip Files C#
Class or Struct

About

A possible MVP structure with some PS scripts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published