Skip to content

Commit 79a2b4c

Browse files
committed
Release V0.1
1 parent 665f45c commit 79a2b4c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+56079
-0
lines changed

MS365_Creator.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.28307.902
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MS365_Creator", "MS365_Creator\MS365_Creator.csproj", "{C59871DD-0CCB-4B41-BCAE-3EA9C04B01AC}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{C59871DD-0CCB-4B41-BCAE-3EA9C04B01AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{C59871DD-0CCB-4B41-BCAE-3EA9C04B01AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{C59871DD-0CCB-4B41-BCAE-3EA9C04B01AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{C59871DD-0CCB-4B41-BCAE-3EA9C04B01AC}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {DB75AD8F-289D-43AC-8A71-54EAC2D4546D}
24+
EndGlobalSection
25+
EndGlobal

MS365_Creator/App.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
5+
</startup>
6+
</configuration>

MS365_Creator/Icons/logo.ico

4.19 KB
Binary file not shown.

MS365_Creator/MS365_Creator.csproj

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{C59871DD-0CCB-4B41-BCAE-3EA9C04B01AC}</ProjectGuid>
8+
<OutputType>Exe</OutputType>
9+
<RootNamespace>MS365_Creator</RootNamespace>
10+
<AssemblyName>MS365_Creator</AssemblyName>
11+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14+
<Deterministic>true</Deterministic>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<PlatformTarget>AnyCPU</PlatformTarget>
18+
<DebugSymbols>true</DebugSymbols>
19+
<DebugType>full</DebugType>
20+
<Optimize>false</Optimize>
21+
<OutputPath>bin\Debug\</OutputPath>
22+
<DefineConstants>DEBUG;TRACE</DefineConstants>
23+
<ErrorReport>prompt</ErrorReport>
24+
<WarningLevel>4</WarningLevel>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27+
<PlatformTarget>AnyCPU</PlatformTarget>
28+
<DebugType>pdbonly</DebugType>
29+
<Optimize>true</Optimize>
30+
<OutputPath>bin\Release\</OutputPath>
31+
<DefineConstants>TRACE</DefineConstants>
32+
<ErrorReport>prompt</ErrorReport>
33+
<WarningLevel>4</WarningLevel>
34+
</PropertyGroup>
35+
<PropertyGroup>
36+
<ApplicationIcon>logo.ico</ApplicationIcon>
37+
</PropertyGroup>
38+
<ItemGroup>
39+
<Reference Include="Colorful.Console, Version=1.2.10.0, Culture=neutral, processorArchitecture=MSIL">
40+
<HintPath>..\packages\Colorful.Console.1.2.10\lib\net461\Colorful.Console.dll</HintPath>
41+
</Reference>
42+
<Reference Include="Leaf.xNet, Version=5.2.6.0, Culture=neutral, processorArchitecture=MSIL">
43+
<HintPath>..\packages\Leaf.xNet.5.2.6\lib\net45\Leaf.xNet.dll</HintPath>
44+
</Reference>
45+
<Reference Include="System" />
46+
<Reference Include="System.Core" />
47+
<Reference Include="System.Drawing" />
48+
<Reference Include="System.Web" />
49+
<Reference Include="System.Xml.Linq" />
50+
<Reference Include="System.Data.DataSetExtensions" />
51+
<Reference Include="Microsoft.CSharp" />
52+
<Reference Include="System.Data" />
53+
<Reference Include="System.Net.Http" />
54+
<Reference Include="System.Xml" />
55+
<Reference Include="WebDriver, Version=3.141.0.0, Culture=neutral, processorArchitecture=MSIL">
56+
<HintPath>..\packages\Selenium.WebDriver.3.141.0\lib\net45\WebDriver.dll</HintPath>
57+
</Reference>
58+
</ItemGroup>
59+
<ItemGroup>
60+
<Compile Include="Program.cs" />
61+
<Compile Include="Properties\AssemblyInfo.cs" />
62+
</ItemGroup>
63+
<ItemGroup>
64+
<None Include="App.config" />
65+
<None Include="packages.config" />
66+
</ItemGroup>
67+
<ItemGroup>
68+
<Content Include="logo.ico" />
69+
</ItemGroup>
70+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
71+
</Project>

MS365_Creator/Program.cs

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using OpenQA.Selenium;
7+
using OpenQA.Selenium.Chrome;
8+
using System.Threading;
9+
using OpenQA.Selenium.Support.UI;
10+
using Leaf.xNet;
11+
using System.Text.RegularExpressions;
12+
using System.Net;
13+
using System.Security.Cryptography;
14+
using System.IO;
15+
16+
namespace MS365_Creator
17+
{
18+
class Program
19+
{
20+
static string cMail = "";
21+
static int toWait = 0;
22+
static void Main(string[] args)
23+
{
24+
restart:
25+
Console.Clear();
26+
Console.Title = "MS 365 Account Creator";
27+
Console.Write("Waiting time for email (in s) (leave null for default): ");
28+
string tempAmount = Console.ReadLine();
29+
if (tempAmount != "") toWait = int.Parse(tempAmount) * 1000;
30+
else toWait = 20000;
31+
Console.Write("Do you want to use custom details? (Yes/No): ");
32+
string useCustom = Console.ReadLine().ToLower();
33+
if (useCustom == "") useCustom = "no";
34+
try
35+
{
36+
if (useCustom == "yes")
37+
{
38+
Console.Title = "MS 365 Account Creator | Custom Mode";
39+
bool usingCustom = true;
40+
Console.Write("First Name: ");
41+
string fName = Console.ReadLine();
42+
Console.Write("Last Name: ");
43+
string lName = Console.ReadLine();
44+
Console.Write("Custom email (no special chars): ");
45+
cMail = Console.ReadLine();
46+
if (cMail == "") usingCustom = false;
47+
if (lName == "") lName = "‎";
48+
string finalFolder = $"Accounts/{DateTime.Now.ToString("MM.dd H.mm")} - {fName} {lName}.txt";
49+
File.AppendAllText(finalFolder, CreateAccount(fName, lName,usingCustom));
50+
Colorful.Console.WriteLine($"Generating of custom account ({fName} | {lName} | {cMail}) done...",System.Drawing.Color.Yellow);
51+
}
52+
else
53+
{
54+
Console.Title = "MS 365 Account Creator | Mass Creation";
55+
Console.Write("How many accounts should I prepare?: ");
56+
int toMake = int.Parse(Console.ReadLine());
57+
string finalFolder = $"Accounts/{DateTime.Now.ToString("MM.dd H.mm")} - {toMake} accounts.txt";
58+
int aGenerated = 0;
59+
Console.Clear();
60+
Colorful.Console.WriteAscii(" Generating");
61+
Colorful.Console.WriteLine($" Generated [{aGenerated}/{toMake}]", System.Drawing.Color.Yellow);
62+
for (int i = 0; i < toMake; i++)
63+
{
64+
File.AppendAllText(finalFolder, CreateAccount(GetName(), "‎",false));
65+
++aGenerated;
66+
Console.Clear();
67+
Colorful.Console.WriteAscii(" Generating");
68+
Colorful.Console.WriteLine($" Generated [{aGenerated}/{toMake}]", System.Drawing.Color.Yellow);
69+
70+
}
71+
}
72+
}
73+
catch(Exception e)
74+
{
75+
Console.Clear();
76+
Colorful.Console.Write("ERROR OCCURRED! Error message:", System.Drawing.Color.Red); Colorful.Console.Write($" {e.Message}", System.Drawing.Color.White);
77+
Console.ReadKey();
78+
}
79+
Console.Clear();
80+
Colorful.Console.Write("Do you want to continue generating? (Yes/No): ",System.Drawing.Color.Yellow);
81+
string output = Console.ReadLine().ToLower();
82+
if (output == "yes") goto restart;
83+
else
84+
{
85+
Console.Clear();
86+
Colorful.Console.Write("Created by matt", System.Drawing.Color.Lime); Colorful.Console.Write(" | ", System.Drawing.Color.Gray); Colorful.Console.Write("Press any key to exit", System.Drawing.Color.Yellow);
87+
Console.ReadKey();
88+
}
89+
}
90+
static string CreateAccount(string fName, string lName,bool customMail)
91+
{
92+
ChromeOptions options = new ChromeOptions();
93+
options.AddArgument("--window-size=380,700");
94+
ChromeDriverService service = ChromeDriverService.CreateDefaultService();
95+
service.HideCommandPromptWindow = true; //Disable the logging feature
96+
IWebDriver driver = new ChromeDriver(service,options);
97+
driver.Navigate().GoToUrl("https://xkx.me");
98+
Thread.Sleep(2500);
99+
string email = "";
100+
IWebElement element = driver.FindElement(By.ClassName("copyable"));
101+
if(!customMail) email = element.GetAttribute("data-clipboard-text");
102+
else
103+
{
104+
element = driver.FindElement(By.Id("customShortid"));
105+
IJavaScriptExecutor executor = driver as IJavaScriptExecutor;
106+
executor.ExecuteScript("arguments[0].click();", element);
107+
element = driver.FindElement(By.Id("shortid"));
108+
element.SendKeys(cMail);
109+
element = driver.FindElement(By.Id("customShortid"));
110+
executor.ExecuteScript("arguments[0].click();", element);
111+
email = cMail + "@xkx.me";
112+
}
113+
((IJavaScriptExecutor)driver).ExecuteScript("window.open();");
114+
driver.SwitchTo().Window(driver.WindowHandles.Last());
115+
driver.Navigate().GoToUrl("https://signup.microsoft.com/signup?sku=student");
116+
Thread.Sleep(2500);
117+
element = driver.FindElement(By.Id("StepsData_Email"));
118+
element.SendKeys(email);
119+
element = driver.FindElement(By.ClassName("mpl-button-next-text"));
120+
element.Click();
121+
driver.SwitchTo().Window(driver.WindowHandles.First());
122+
Thread.Sleep(toWait);
123+
element = driver.FindElement(By.Id("emaillist"));
124+
Match verCode = Regex.Match(element.Text, "([0-9]{6})", RegexOptions.IgnoreCase);
125+
driver.SwitchTo().Window(driver.WindowHandles.Last());
126+
element = driver.FindElement(By.Id("FirstName"));
127+
element.SendKeys(fName);
128+
element = driver.FindElement(By.Id("LastName"));
129+
element.SendKeys(lName);
130+
element = driver.FindElement(By.Id("Password"));
131+
string password = GeneratePassword(10);
132+
element.SendKeys(password);
133+
element = driver.FindElement(By.Id("RePassword"));
134+
element.SendKeys(password);
135+
element = driver.FindElement(By.Id("SignupCode"));
136+
element.SendKeys(verCode.Value);
137+
element = driver.FindElement(By.ClassName("mpl-button-next-text"));
138+
element.Click();
139+
driver.Quit();
140+
return $"Username : {email}\nPassword : {password}\n************************************\n";
141+
}
142+
static string GetName()
143+
{
144+
string[] names = { "Jennifer", "Patrick", "Carola", "Frank", "Aaron", "Willie", "Joseph" };
145+
Random random = new Random();
146+
int num = random.Next(0, names.Length-1);
147+
return names[num];
148+
}
149+
static string GeneratePassword(int length)
150+
{
151+
const string valid = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
152+
StringBuilder res = new StringBuilder();
153+
Random rnd = new Random();
154+
while (0 < length--)
155+
{
156+
res.Append(valid[rnd.Next(valid.Length)]);
157+
}
158+
return res.ToString();
159+
}
160+
}
161+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("MS365_Creator")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("MS365_Creator")]
13+
[assembly: AssemblyCopyright("Copyright © 2020")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("c59871dd-0ccb-4b41-bcae-3ea9c04b01ac")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]

MS365_Creator/logo.ico

4.19 KB
Binary file not shown.
Binary file not shown.

MS365_Creator/obj/Debug/MS365_Creator.csproj.CopyComplete

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
314e86991f8de7a0b974d16e99bf228572ff79ef

0 commit comments

Comments
 (0)