-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
94b65f4
commit 3a5608f
Showing
16 changed files
with
446 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{7E35C20A-8872-42EE-99EE-855EC260DA57}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>Kye</RootNamespace> | ||
<AssemblyName>Kye</AssemblyName> | ||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<Deterministic>true</Deterministic> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Management" /> | ||
<Reference Include="System.Windows.Forms" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Net.Http" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="KyeInt.cs" /> | ||
<Compile Include="KyeString.cs" /> | ||
<Compile Include="KyeBool.cs" /> | ||
<Compile Include="KyeFunction.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 16 | ||
VisualStudioVersion = 16.0.30002.166 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kye", "Kye.csproj", "{7E35C20A-8872-42EE-99EE-855EC260DA57}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{7E35C20A-8872-42EE-99EE-855EC260DA57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{7E35C20A-8872-42EE-99EE-855EC260DA57}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{7E35C20A-8872-42EE-99EE-855EC260DA57}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{7E35C20A-8872-42EE-99EE-855EC260DA57}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {28F96139-7456-4ADC-A330-DE60113B9DE9} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
using System.Net; | ||
namespace Kye | ||
{ | ||
public static class KyeBool | ||
{ | ||
public static bool HasInternet() | ||
{ | ||
using (WebClient webClient = new WebClient()) | ||
{ | ||
try | ||
{ | ||
string a = webClient.DownloadString("https://google.com"); | ||
return true; | ||
} | ||
catch | ||
{ | ||
return false; | ||
} | ||
} | ||
} | ||
public static bool RandomBool() | ||
{ | ||
Random rng = new Random(); | ||
return rng.Next(0, 2) > 0; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
using System.Diagnostics; | ||
using System.Net; | ||
using System.Collections.Specialized; | ||
using System.Windows.Forms; | ||
using System; | ||
using System.Runtime.InteropServices; | ||
using System.IO; | ||
using System.Text; | ||
namespace Kye | ||
{ | ||
public class KyeFunction | ||
{ | ||
public static void sendDiscordWebhook(string URL, string profilepic, string username, string message) | ||
{ | ||
using (WebClient web = new WebClient()) | ||
{ | ||
NameValueCollection discordValues = new NameValueCollection(); | ||
discordValues.Clear(); | ||
discordValues.Add("username", username); | ||
discordValues.Add("avatar_url", profilepic); | ||
discordValues.Add("content", message); | ||
web.UploadValues(URL, discordValues); | ||
} | ||
} | ||
public static void CheckForMalicious() | ||
{ | ||
Process[] processlist = Process.GetProcesses(); | ||
foreach (Process theprocess in processlist) | ||
{ | ||
if (theprocess.ProcessName.Contains("Fiddler") | theprocess.ProcessName.Contains("HTTP") && theprocess.ProcessName.Contains("Debug")) | ||
theprocess.Kill(); | ||
} | ||
} | ||
|
||
public static void CheckMD5(string url_with_official_md5, [Optional] string optional_message_to_show_when_modified) | ||
{ | ||
WebClient webClient = new WebClient(); | ||
string websitehash = webClient.DownloadString(url_with_official_md5); | ||
string programhash = KyeString.GetThisMD5(); | ||
string programname = AppDomain.CurrentDomain.FriendlyName.Replace(".exe", ""); | ||
if (!websitehash.Contains(programhash)) | ||
{ | ||
if (optional_message_to_show_when_modified == null) | ||
{ | ||
MessageBox.Show("This program has been modified and is NOT official. Please download the original one", programname,MessageBoxButtons.OK, MessageBoxIcon.Error); | ||
Environment.Exit(0); | ||
} | ||
else | ||
{ | ||
MessageBox.Show(optional_message_to_show_when_modified, programname, MessageBoxButtons.OK, MessageBoxIcon.Error); | ||
Environment.Exit(0); | ||
} | ||
} | ||
webClient.Dispose(); | ||
} | ||
|
||
public static void DeleteFile(string filename) | ||
{ | ||
if (File.Exists(filename)) | ||
File.Delete(filename); | ||
} | ||
|
||
public static void WriteLine(string filepath, string newText, int line_to_edit) | ||
{ | ||
string programname = AppDomain.CurrentDomain.FriendlyName.Replace(".exe", ""); | ||
try | ||
{ | ||
string[] arrLine = File.ReadAllLines(filepath, Encoding.UTF8); | ||
arrLine[line_to_edit - 1] = newText; | ||
File.WriteAllLines(filepath, arrLine); | ||
} | ||
catch (IndexOutOfRangeException) | ||
{ | ||
MessageBox.Show("Line " + line_to_edit + " does not exist in " + filepath, programname, MessageBoxButtons.OK, MessageBoxIcon.Error); | ||
} | ||
catch (Exception ex) | ||
{ | ||
|
||
MessageBox.Show(ex.Message, programname, MessageBoxButtons.OK, MessageBoxIcon.Error); | ||
} | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System; | ||
namespace Kye | ||
{ | ||
public class KyeInt | ||
{ | ||
public static int RandomInt(int min, int max) | ||
{ | ||
Random random = new Random(); | ||
return random.Next(min, max); | ||
} | ||
public static int GetGPUCount() | ||
{ | ||
int gpucount = KyeString.GetGPU().Length - 1; | ||
return gpucount; | ||
} | ||
} | ||
} |
Oops, something went wrong.