Merge branch 'bugfix/loginToken'

* bugfix/loginToken:
  Fixed the instructions how to gather the login token
  Added startup confirmation to inform the user about selfbots violating discord tos
This commit is contained in:
Serraniel 2018-08-29 23:18:20 +02:00
commit f311ed9f49
Signed by untrusted user who does not match committer: Serraniel
GPG key ID: 3690B4E7364525D3
4 changed files with 22 additions and 6 deletions

View file

@ -82,7 +82,6 @@ namespace DML.Application.Classes
Logger.Trace("Created log folder."); Logger.Trace("Created log folder.");
} }
var logFile = Path.Combine(logFolder, var logFile = Path.Combine(logFolder,
SweetUtils.LegalizeFilename($"{DateTime.Now.ToString(CultureInfo.CurrentCulture.DateTimeFormat.SortableDateTimePattern)}.log.zip")); SweetUtils.LegalizeFilename($"{DateTime.Now.ToString(CultureInfo.CurrentCulture.DateTimeFormat.SortableDateTimePattern)}.log.zip"));
@ -109,6 +108,18 @@ namespace DML.Application.Classes
Settings.Store(); Settings.Store();
} }
if (Settings.ShowStartUpHints)
{
if (MessageBox.Show(splash, "This tool is considered as a selfbot which may violate the Discord TOS. By using this tool you take the risk to get your account banned. Although this never happened yet (as far as I know) you have to confirm to this.\n\r\n\rDo you wish to continue?", "HOLD UP!!", MessageBoxButtons.YesNo) != DialogResult.Yes)
{
splash.Close();
return;
}
Settings.ShowStartUpHints = false;
Settings.Store();
}
Logger.Debug("Loading jobs collection out of database..."); Logger.Debug("Loading jobs collection out of database...");
Scheduler.JobList = Job.RestoreJobs().ToList(); Scheduler.JobList = Job.RestoreJobs().ToList();
@ -175,7 +186,7 @@ namespace DML.Application.Classes
if (!string.IsNullOrEmpty(Settings.LoginToken)) if (!string.IsNullOrEmpty(Settings.LoginToken))
{ {
Logger.Debug("Trying to login with last known token..."); Logger.Debug("Trying to login with last known token...");
loggedIn= await DMLClient.Login(Settings.LoginToken); loggedIn = await DMLClient.Login(Settings.LoginToken);
} }
if (!loggedIn) if (!loggedIn)

View file

@ -15,6 +15,7 @@ namespace DML.Application.Classes
public string FileNameScheme { get; set; } = @"%guild%\%channel%\%id%"; public string FileNameScheme { get; set; } = @"%guild%\%channel%\%id%";
public bool SkipExistingFiles { get; set; } = true; public bool SkipExistingFiles { get; set; } = true;
public int ThreadLimit { get; set; } = 50; public int ThreadLimit { get; set; } = 50;
public bool ShowStartUpHints { get; set; } = true;
public void Store() public void Store()
{ {

View file

@ -44,7 +44,7 @@
this.pnlButtons.Controls.Add(this.btnAbort); this.pnlButtons.Controls.Add(this.btnAbort);
this.pnlButtons.Controls.Add(this.btnOk); this.pnlButtons.Controls.Add(this.btnOk);
this.pnlButtons.Dock = System.Windows.Forms.DockStyle.Bottom; this.pnlButtons.Dock = System.Windows.Forms.DockStyle.Bottom;
this.pnlButtons.Location = new System.Drawing.Point(0, 168); this.pnlButtons.Location = new System.Drawing.Point(0, 189);
this.pnlButtons.Name = "pnlButtons"; this.pnlButtons.Name = "pnlButtons";
this.pnlButtons.Size = new System.Drawing.Size(426, 51); this.pnlButtons.Size = new System.Drawing.Size(426, 51);
this.pnlButtons.TabIndex = 0; this.pnlButtons.TabIndex = 0;
@ -71,9 +71,11 @@
// //
// lbHowToToken // lbHowToToken
// //
this.lbHowToToken.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.lbHowToToken.Location = new System.Drawing.Point(7, 58); this.lbHowToToken.Location = new System.Drawing.Point(7, 58);
this.lbHowToToken.Name = "lbHowToToken"; this.lbHowToToken.Name = "lbHowToToken";
this.lbHowToToken.Size = new System.Drawing.Size(412, 87); this.lbHowToToken.Size = new System.Drawing.Size(412, 128);
this.lbHowToToken.TabIndex = 5; this.lbHowToToken.TabIndex = 5;
this.lbHowToToken.Text = resources.GetString("lbHowToToken.Text"); this.lbHowToToken.Text = resources.GetString("lbHowToToken.Text");
// //
@ -97,7 +99,7 @@
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(426, 219); this.ClientSize = new System.Drawing.Size(426, 240);
this.Controls.Add(this.lbHowToToken); this.Controls.Add(this.lbHowToToken);
this.Controls.Add(this.edToken); this.Controls.Add(this.edToken);
this.Controls.Add(this.lbToken); this.Controls.Add(this.lbToken);

View file

@ -120,7 +120,9 @@
<data name="lbHowToToken.Text" xml:space="preserve"> <data name="lbHowToToken.Text" xml:space="preserve">
<value>To find your login token please start Discord and press Ctrl + Shift + I shortcut. A browser inspector will open. <value>To find your login token please start Discord and press Ctrl + Shift + I shortcut. A browser inspector will open.
Navigate into the "Application" tab and select "Local Storage" / "https://discordapp.com". If the right site keeps blank use "Session Storage" instead. Navigate into the "Application" tab and select "Local Storage" / "https://discordapp.com". If the right site keeps blank use "Session Storage" instead.
Look for the token key and copy its value without the quotation marks.</value> Look for the token key and copy its value without the quotation marks.
IF YOU CANNOT FIND YOUR TOKEN you can try pressing Ctrl + R while having the inspector open. While reloading you still should be able to grab the token. It may disappear after discord has finished loading.</value>
</data> </data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">