示例#1
0
        public Settings()
        {
            InitializeComponent();

            txtUsername.Text     = Properties.Settings.Default.username;
            txtPassword.Password = ObfuscatePW.ToInsecureString(ObfuscatePW.DecryptString(Properties.Settings.Default.password));
            txtServer.Text       = Properties.Settings.Default.remoteServer;
            txtLocal.Text        = Properties.Settings.Default.localPort.ToString();
            txtRemote.Text       = Properties.Settings.Default.remotePort.ToString();
            txtDelay.Text        = Properties.Settings.Default.delay.ToString();
        }
示例#2
0
 private bool LoginSendPacket(string packet)
 {
     if (sessionKey == string.Empty)
     {
         // Login if not logged in yet
         WriteLog("LOGIN...");
         string s = $"AUTH user={Properties.Settings.Default.username}&pass={ObfuscatePW.ToInsecureString(ObfuscatePW.DecryptString(Properties.Settings.Default.password))}&protover=3&client=lxanidb&clientver=2";
         if (!SendPacket(s))
         {
             return(false);
         }
         logoutTimer.Start();
     }
     return(SendPacket($"{packet}&s={sessionKey}"));
 }