using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Text;
namespace Backdoor
{
///
/// Summary description for Form1.
///
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox edOut;
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.edOut = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// edOut
//
this.edOut.Dock = System.Windows.Forms.DockStyle.Fill;
this.edOut.Location = new System.Drawing.Point(0, 0);
this.edOut.Multiline = true;
this.edOut.Name = "edOut";
this.edOut.Size = new System.Drawing.Size(456, 293);
this.edOut.TabIndex = 0;
this.edOut.Text = "";
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(456, 293);
this.Controls.Add(this.edOut);
this.Name = "Form1";
this.Text = "AyaNova BackDoor login ";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);
}
#endregion
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void Form1_Load(object sender, System.EventArgs e)
{
edOut.AppendText("Today's login:\r\n");
edOut.AppendText(Generate(System.DateTime.Today,new Random(unchecked((int)DateTime.Now.Ticks))));
edOut.AppendText("\r\nTomorrow's login:\r\n");
edOut.AppendText(Generate(System.DateTime.Today.AddDays(1),new Random(~unchecked((int)DateTime.Now.Ticks))));
}
private string Generate(System.DateTime dtWhen, Random r)
{
int nDummyCharFactor=4;
int ndwf=0;
StringBuilder sb = new StringBuilder();
string sLogin="";
string sPassword="";
switch(dtWhen.DayOfWeek)
{
case System.DayOfWeek.Monday:
ndwf=12;
break;
case System.DayOfWeek.Tuesday:
ndwf=49;
break;
case System.DayOfWeek.Wednesday:
ndwf=23;
break;
case System.DayOfWeek.Thursday:
ndwf=65;
break;
case System.DayOfWeek.Friday:
ndwf=87;
break;
case System.DayOfWeek.Sunday:
ndwf=99;
break;
case System.DayOfWeek.Saturday:
ndwf=72;
break;
}
int nLogin=dtWhen.DayOfYear+ndwf*ndwf;
int nPassword=(dtWhen.Year+dtWhen.Month+ndwf)*(ndwf+2);
char dummy=' ';
foreach(char c in nLogin.ToString())
{
int nDummycharcount=r.Next(nDummyCharFactor)+1;
for(int x=0;x