Advertisement
Guest User

Untitled

a guest
Feb 14th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.75 KB | None | 0 0
  1. using System;
  2. using System.ComponentModel;
  3. using System.Drawing;
  4. using System.Windows.Forms;
  5. using BetterSocks;
  6. using DROSE.Properties;
  7.  
  8. namespace DROSE
  9. {
  10. // Token: 0x02000031 RID: 49
  11. public class Login : Form
  12. {
  13. // Token: 0x060000B7 RID: 183 RVA: 0x00005288 File Offset: 0x00003488
  14. public Login()
  15. {
  16. this.InitializeComponent();
  17. FormManagement.RandomizeTitle(this);
  18. FormManagement.Movable(this.pnlTop, this);
  19. FormManagement.Movable(this.lblTitle, this);
  20. FormManagement.ApplyPlaceholder(this.txtUsername, "username", Color.DarkCyan, Color.Cyan, null);
  21. FormManagement.ApplyPlaceholder(this.txtPassword, "password", Color.DarkCyan, Color.Cyan, "•");
  22. FormManagement.ApplyPlaceholder(this.txtRegisterUsername, "username", Color.DarkCyan, Color.Cyan, null);
  23. FormManagement.ApplyPlaceholder(this.txtRegisterPassword, "password", Color.DarkCyan, Color.Cyan, "•");
  24. FormManagement.ApplyPlaceholder(this.txtRegisterLicense, "license key", Color.DarkCyan, Color.Cyan, null);
  25. bool flag = !Seal.Authenticate("udDY5ahKWO4q0oHqDOSUfXNPXR45wkM0yqZDBgox5tY6R").status;
  26. if (flag)
  27. {
  28. MessageBox.Show("Failed to contact login server.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
  29. Application.Exit();
  30. }
  31. }
  32.  
  33. // Token: 0x060000B8 RID: 184 RVA: 0x00005391 File Offset: 0x00003591
  34. private void btnExit_Click(object sender, EventArgs e)
  35. {
  36. Application.Exit();
  37. }
  38.  
  39. // Token: 0x060000B9 RID: 185 RVA: 0x0000539C File Offset: 0x0000359C
  40. private void btnLogin_Click(object sender, EventArgs e)
  41. {
  42. LoginResponse loginResponse = Seal.Login(this.txtUsername.Text, this.txtPassword.Text);
  43. bool status = loginResponse.status;
  44. if (status)
  45. {
  46. string text = string.Empty;
  47. bool flag = loginResponse.remain == "lifetime";
  48. if (flag)
  49. {
  50. text = "Never";
  51. }
  52. else
  53. {
  54. text = Login.FromUnixTime(Convert.ToInt64(loginResponse.remain)).ToString("MMM d, yyyy @ hh: mm tt");
  55. }
  56. MessageBox.Show(string.Format("Welcome back, {0}!\nYour sub expires: {1}", loginResponse.username, text), "DROSE", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  57. Login._user = this.txtUsername.Text;
  58. Login._exp = text;
  59. new Main().Show();
  60. base.Hide();
  61. }
  62. else
  63. {
  64. MessageBox.Show("Failed to login.", "Errose", MessageBoxButtons.OK, MessageBoxIcon.Hand);
  65. }
  66. }
  67.  
  68. // Token: 0x060000BA RID: 186 RVA: 0x00005478 File Offset: 0x00003678
  69. private void btnCreateAccount_Click(object sender, EventArgs e)
  70. {
  71. RegisterResponse registerResponse = Seal.Register(this.txtRegisterUsername.Text, this.txtRegisterPassword.Text, this.txtRegisterLicense.Text);
  72. bool status = registerResponse.status;
  73. if (status)
  74. {
  75. MessageBox.Show(string.Format("Welcome to DROSE, {0}!\nAccount created successfully.", this.txtRegisterUsername.Text), "DROSE", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  76. this.tabControl.SelectedIndex = 0;
  77. }
  78. else
  79. {
  80. MessageBox.Show("Failed to create your account.", "Errose", MessageBoxButtons.OK, MessageBoxIcon.Hand);
  81. }
  82. }
  83.  
  84. // Token: 0x060000BB RID: 187 RVA: 0x00005504 File Offset: 0x00003704
  85. public static DateTime FromUnixTime(long unixTime)
  86. {
  87. DateTime dateTime = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
  88. return dateTime.AddSeconds((double)unixTime);
  89. }
  90.  
  91. // Token: 0x060000BC RID: 188 RVA: 0x00005534 File Offset: 0x00003734
  92. protected override void Dispose(bool disposing)
  93. {
  94. bool flag = disposing && this.components != null;
  95. if (flag)
  96. {
  97. this.components.Dispose();
  98. }
  99. base.Dispose(disposing);
  100. }
  101.  
  102. // Token: 0x060000BD RID: 189 RVA: 0x0000556C File Offset: 0x0000376C
  103. private void InitializeComponent()
  104. {
  105. this.pnlTop = new Panel();
  106. this.btnExit = new Button();
  107. this.lblTitle = new Label();
  108. this.tabControl = new TabControl();
  109. this.tabLogin = new TabPage();
  110. this.btnLogin = new Button();
  111. this.txtPassword = new TextBox();
  112. this.txtUsername = new TextBox();
  113. this.tabRegister = new TabPage();
  114. this.txtRegisterLicense = new TextBox();
  115. this.btnCreateAccount = new Button();
  116. this.txtRegisterPassword = new TextBox();
  117. this.txtRegisterUsername = new TextBox();
  118. this.pnlTop.SuspendLayout();
  119. this.tabControl.SuspendLayout();
  120. this.tabLogin.SuspendLayout();
  121. this.tabRegister.SuspendLayout();
  122. base.SuspendLayout();
  123. this.pnlTop.BackColor = Color.Aqua;
  124. this.pnlTop.Controls.Add(this.btnExit);
  125. this.pnlTop.Controls.Add(this.lblTitle);
  126. this.pnlTop.Location = new Point(12, 12);
  127. this.pnlTop.Name = "pnlTop";
  128. this.pnlTop.Size = new Size(374, 43);
  129. this.pnlTop.TabIndex = 0;
  130. this.btnExit.FlatStyle = FlatStyle.Flat;
  131. this.btnExit.Font = new Font("Tahoma", 11.25f, FontStyle.Bold, GraphicsUnit.Point, 0);
  132. this.btnExit.Location = new Point(321, 5);
  133. this.btnExit.Name = "btnExit";
  134. this.btnExit.Size = new Size(46, 31);
  135. this.btnExit.TabIndex = 1;
  136. this.btnExit.Text = "X";
  137. this.btnExit.UseVisualStyleBackColor = true;
  138. this.btnExit.Click += this.btnExit_Click;
  139. this.lblTitle.AutoSize = true;
  140. this.lblTitle.Font = new Font("Tahoma", 15.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
  141. this.lblTitle.ForeColor = Color.Black;
  142. this.lblTitle.Location = new Point(106, 9);
  143. this.lblTitle.Name = "lblTitle";
  144. this.lblTitle.Size = new Size(163, 25);
  145. this.lblTitle.TabIndex = 0;
  146. this.lblTitle.Text = "DROSE Loader";
  147. this.tabControl.Controls.Add(this.tabLogin);
  148. this.tabControl.Controls.Add(this.tabRegister);
  149. this.tabControl.Font = new Font("Tahoma", 8.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
  150. this.tabControl.Location = new Point(12, 61);
  151. this.tabControl.Name = "tabControl";
  152. this.tabControl.SelectedIndex = 0;
  153. this.tabControl.Size = new Size(374, 205);
  154. this.tabControl.TabIndex = 1;
  155. this.tabLogin.BackgroundImage = Resources.bg;
  156. this.tabLogin.BackgroundImageLayout = ImageLayout.Center;
  157. this.tabLogin.Controls.Add(this.btnLogin);
  158. this.tabLogin.Controls.Add(this.txtPassword);
  159. this.tabLogin.Controls.Add(this.txtUsername);
  160. this.tabLogin.Font = new Font("Tahoma", 8.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
  161. this.tabLogin.Location = new Point(4, 22);
  162. this.tabLogin.Name = "tabLogin";
  163. this.tabLogin.Padding = new Padding(3);
  164. this.tabLogin.Size = new Size(366, 179);
  165. this.tabLogin.TabIndex = 0;
  166. this.tabLogin.Text = "Login";
  167. this.tabLogin.UseVisualStyleBackColor = true;
  168. this.btnLogin.BackColor = Color.FromArgb(64, 64, 64);
  169. this.btnLogin.FlatStyle = FlatStyle.Popup;
  170. this.btnLogin.Font = new Font("Tahoma", 15.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
  171. this.btnLogin.ForeColor = Color.Aqua;
  172. this.btnLogin.Location = new Point(31, 104);
  173. this.btnLogin.Name = "btnLogin";
  174. this.btnLogin.Size = new Size(305, 48);
  175. this.btnLogin.TabIndex = 2;
  176. this.btnLogin.Text = "Login to DROSE";
  177. this.btnLogin.UseVisualStyleBackColor = false;
  178. this.btnLogin.Click += this.btnLogin_Click;
  179. this.txtPassword.BackColor = Color.FromArgb(64, 64, 64);
  180. this.txtPassword.BorderStyle = BorderStyle.FixedSingle;
  181. this.txtPassword.Font = new Font("Tahoma", 14.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
  182. this.txtPassword.ForeColor = Color.Aqua;
  183. this.txtPassword.Location = new Point(31, 68);
  184. this.txtPassword.Name = "txtPassword";
  185. this.txtPassword.Size = new Size(305, 30);
  186. this.txtPassword.TabIndex = 1;
  187. this.txtPassword.TextAlign = HorizontalAlignment.Center;
  188. this.txtUsername.BackColor = Color.FromArgb(64, 64, 64);
  189. this.txtUsername.BorderStyle = BorderStyle.FixedSingle;
  190. this.txtUsername.Font = new Font("Tahoma", 14.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
  191. this.txtUsername.ForeColor = Color.Aqua;
  192. this.txtUsername.Location = new Point(31, 32);
  193. this.txtUsername.Name = "txtUsername";
  194. this.txtUsername.Size = new Size(305, 30);
  195. this.txtUsername.TabIndex = 0;
  196. this.txtUsername.TextAlign = HorizontalAlignment.Center;
  197. this.tabRegister.BackgroundImage = Resources.bg;
  198. this.tabRegister.BackgroundImageLayout = ImageLayout.Center;
  199. this.tabRegister.Controls.Add(this.txtRegisterLicense);
  200. this.tabRegister.Controls.Add(this.btnCreateAccount);
  201. this.tabRegister.Controls.Add(this.txtRegisterPassword);
  202. this.tabRegister.Controls.Add(this.txtRegisterUsername);
  203. this.tabRegister.Location = new Point(4, 22);
  204. this.tabRegister.Name = "tabRegister";
  205. this.tabRegister.Padding = new Padding(3);
  206. this.tabRegister.Size = new Size(366, 179);
  207. this.tabRegister.TabIndex = 1;
  208. this.tabRegister.Text = "Register";
  209. this.tabRegister.UseVisualStyleBackColor = true;
  210. this.txtRegisterLicense.BackColor = Color.FromArgb(64, 64, 64);
  211. this.txtRegisterLicense.BorderStyle = BorderStyle.FixedSingle;
  212. this.txtRegisterLicense.Font = new Font("Tahoma", 14.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
  213. this.txtRegisterLicense.ForeColor = Color.Aqua;
  214. this.txtRegisterLicense.Location = new Point(31, 83);
  215. this.txtRegisterLicense.Name = "txtRegisterLicense";
  216. this.txtRegisterLicense.Size = new Size(305, 30);
  217. this.txtRegisterLicense.TabIndex = 6;
  218. this.txtRegisterLicense.TextAlign = HorizontalAlignment.Center;
  219. this.btnCreateAccount.BackColor = Color.FromArgb(64, 64, 64);
  220. this.btnCreateAccount.FlatStyle = FlatStyle.Popup;
  221. this.btnCreateAccount.Font = new Font("Tahoma", 15.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
  222. this.btnCreateAccount.ForeColor = Color.Aqua;
  223. this.btnCreateAccount.Location = new Point(31, 119);
  224. this.btnCreateAccount.Name = "btnCreateAccount";
  225. this.btnCreateAccount.Size = new Size(305, 48);
  226. this.btnCreateAccount.TabIndex = 5;
  227. this.btnCreateAccount.Text = "Create Account";
  228. this.btnCreateAccount.UseVisualStyleBackColor = false;
  229. this.btnCreateAccount.Click += this.btnCreateAccount_Click;
  230. this.txtRegisterPassword.BackColor = Color.FromArgb(64, 64, 64);
  231. this.txtRegisterPassword.BorderStyle = BorderStyle.FixedSingle;
  232. this.txtRegisterPassword.Font = new Font("Tahoma", 14.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
  233. this.txtRegisterPassword.ForeColor = Color.Aqua;
  234. this.txtRegisterPassword.Location = new Point(31, 47);
  235. this.txtRegisterPassword.Name = "txtRegisterPassword";
  236. this.txtRegisterPassword.Size = new Size(305, 30);
  237. this.txtRegisterPassword.TabIndex = 4;
  238. this.txtRegisterPassword.TextAlign = HorizontalAlignment.Center;
  239. this.txtRegisterUsername.BackColor = Color.FromArgb(64, 64, 64);
  240. this.txtRegisterUsername.BorderStyle = BorderStyle.FixedSingle;
  241. this.txtRegisterUsername.Font = new Font("Tahoma", 14.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
  242. this.txtRegisterUsername.ForeColor = Color.Aqua;
  243. this.txtRegisterUsername.Location = new Point(31, 11);
  244. this.txtRegisterUsername.Name = "txtRegisterUsername";
  245. this.txtRegisterUsername.Size = new Size(305, 30);
  246. this.txtRegisterUsername.TabIndex = 3;
  247. this.txtRegisterUsername.TextAlign = HorizontalAlignment.Center;
  248. base.AutoScaleDimensions = new SizeF(6f, 13f);
  249. base.AutoScaleMode = AutoScaleMode.Font;
  250. this.BackColor = Color.FromArgb(64, 64, 64);
  251. base.ClientSize = new Size(398, 278);
  252. base.Controls.Add(this.tabControl);
  253. base.Controls.Add(this.pnlTop);
  254. this.DoubleBuffered = true;
  255. base.FormBorderStyle = FormBorderStyle.None;
  256. base.MaximizeBox = false;
  257. base.Name = "Login";
  258. base.ShowIcon = false;
  259. base.StartPosition = FormStartPosition.CenterScreen;
  260. this.pnlTop.ResumeLayout(false);
  261. this.pnlTop.PerformLayout();
  262. this.tabControl.ResumeLayout(false);
  263. this.tabLogin.ResumeLayout(false);
  264. this.tabLogin.PerformLayout();
  265. this.tabRegister.ResumeLayout(false);
  266. this.tabRegister.PerformLayout();
  267. base.ResumeLayout(false);
  268. }
  269.  
  270. // Token: 0x04000128 RID: 296
  271. public static string _user;
  272.  
  273. // Token: 0x04000129 RID: 297
  274. public static string _exp;
  275.  
  276. // Token: 0x0400012A RID: 298
  277. private IContainer components = null;
  278.  
  279. // Token: 0x0400012B RID: 299
  280. private Panel pnlTop;
  281.  
  282. // Token: 0x0400012C RID: 300
  283. private Button btnExit;
  284.  
  285. // Token: 0x0400012D RID: 301
  286. private Label lblTitle;
  287.  
  288. // Token: 0x0400012E RID: 302
  289. private TabControl tabControl;
  290.  
  291. // Token: 0x0400012F RID: 303
  292. private TabPage tabLogin;
  293.  
  294. // Token: 0x04000130 RID: 304
  295. private TabPage tabRegister;
  296.  
  297. // Token: 0x04000131 RID: 305
  298. private TextBox txtUsername;
  299.  
  300. // Token: 0x04000132 RID: 306
  301. private Button btnLogin;
  302.  
  303. // Token: 0x04000133 RID: 307
  304. private TextBox txtPassword;
  305.  
  306. // Token: 0x04000134 RID: 308
  307. private TextBox txtRegisterLicense;
  308.  
  309. // Token: 0x04000135 RID: 309
  310. private Button btnCreateAccount;
  311.  
  312. // Token: 0x04000136 RID: 310
  313. private TextBox txtRegisterPassword;
  314.  
  315. // Token: 0x04000137 RID: 311
  316. private TextBox txtRegisterUsername;
  317. }
  318. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement