Giter Site home page Giter Site logo

rdp_and_vpn's Introduction

RDP & VPN

Class to use remote desktop pulpit and vpn connection.

using  RemoteDesktop.Net.VPN;

    //List of all defined VPN connections.
    var book = new RasphoneBook();
    book.Open(book.RasphonePath);
    var list = book.Entries;
using  RemoteDesktop.Net.VPN;

    var ras = new Rasdial();
    //Check if VPN is connected
    var output = ras.IsConnectedVPN("VPN_Name");
    //Connect to defined VPN
    ras.Connect("VPN_Name", "login", "password");
    //Launch VPN windows option
    Rasdial.LaunchVPN();
using  RemoteDesktop.Net.RDP;

    //Creat instatnce
    var rdp = new Mstsc();
    //Schow argumnet help in console
    rdp.ShowArgumentHelp();

    //Connect to ip address
    rdp.ConnectRDP("192.168.0.1");
    //list opened remote desktop app.
    var mc = Mstsc.OpenedMstsc();
    //Creat rdp file width parameter
    RdpFile rf = new RdpFile()
    {
        FullAddress = IPPort.Parse("192.168.0.1"),
        UserName = "username",
        Password = "password"
    };
    rf.Save("Test0.rdp");
    
    //encoding password from rdp file
    var upr = RemoteDesktop.Encoding.CryptRDP.Unprotect("01000000D08C9DDF0115...");
public partial class MainWindow : Window
{
    ProcessWatcher mw;

    public MainWindow()
    {
        InitializeComponent();
        mw = new ProcessWatcher("mstsc");
        mw.ClosedProcess += Mw_ClosedProcess;
    }

    private void Mw_ClosedProcess(object sender, ProcessWatcherArgs e)
    {
        MessageBox.Show(e.ID + ":" + e.Button);
    }

    private void Button_Click(object sender, RoutedEventArgs e)
    {
        mw.FindNewProcess("Button");//dodanie do kontrolki przycisku ID procesu.
    }
}
    RDP_Buttons but = new RDP_Buttons();

    but.Buttons.Add(new RDPbutton("Grupa", "caption", "hin", IPPort.Parse("192.168.0.1"), "/admin", new LoginRDP("username", "password"), new LoginVPN("VPN_Name", "login", "password")));

    but.Buttons.Add(new RDPbutton("grup", "cap", "hint", IPPort.Parse("192.168.0.2"), "", new LoginRDP("username", "password"), new LoginVPN("VPN_Name", "login", "password")));

    but.Buttons.Add(new RDPbutton("grup", "cap", "hint", IPPort.Parse("192.168.1.3"), "", new LoginRDP("username", "password"), new LoginVPN()));

    but.Save();

rdp_and_vpn's People

Contributors

yari27 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.