From 009b3b69167d50be574a9e943b047496ccc1f2c7 Mon Sep 17 00:00:00 2001 From: squishylemon <63502775+squishylemon@users.noreply.github.com> Date: Sat, 15 Nov 2025 17:33:08 +1000 Subject: [PATCH] Enhance FakeFileCreator UI and netstat simulation Expanded FakeFileCreator with progress bar, file count input, processed files label, and drive population functionality. Refactored MainForm logic for async file generation and improved user feedback. Updated netstat to simulate active connections with randomized output and progress bar, including LAN detection and improved console display. Changed FakeFileCreator output type to WinExe. --- FakeFileCreator/FakeFileCreator.csproj | 2 +- FakeFileCreator/MainForm.Designer.cs | 80 ++++- FakeFileCreator/MainForm.cs | 335 ++++++++++++++++-- ...gnTimeResolveAssemblyReferencesInput.cache | Bin 7301 -> 2225 bytes ...gnTimeResolveAssemblyReferencesInput.cache | Bin 7260 -> 2205 bytes ...gnTimeResolveAssemblyReferencesInput.cache | Bin 6918 -> 2023 bytes netstat/Program.cs | 87 ++++- ...gnTimeResolveAssemblyReferencesInput.cache | Bin 6825 -> 1808 bytes .../netstat.csproj.CoreCompileInputs.cache | 2 +- .../netstat.csproj.FileListAbsolute.txt | 7 + ...gnTimeResolveAssemblyReferencesInput.cache | Bin 6989 -> 1935 bytes 11 files changed, 465 insertions(+), 48 deletions(-) diff --git a/FakeFileCreator/FakeFileCreator.csproj b/FakeFileCreator/FakeFileCreator.csproj index c6d00c5..98df7a1 100644 --- a/FakeFileCreator/FakeFileCreator.csproj +++ b/FakeFileCreator/FakeFileCreator.csproj @@ -5,7 +5,7 @@ Debug AnyCPU {7609DDC1-DBBD-4C63-ADE6-E123C07E0A90} - Exe + WinExe FakeFileCreator FakeFileCreator v4.8 diff --git a/FakeFileCreator/MainForm.Designer.cs b/FakeFileCreator/MainForm.Designer.cs index 7c742ee..9c4840d 100644 --- a/FakeFileCreator/MainForm.Designer.cs +++ b/FakeFileCreator/MainForm.Designer.cs @@ -33,6 +33,13 @@ private void InitializeComponent() this.btnPictures = new System.Windows.Forms.Button(); this.btnVideos = new System.Windows.Forms.Button(); this.btnMusic = new System.Windows.Forms.Button(); + this.progressBar = new System.Windows.Forms.ProgressBar(); + this.sidepanel = new System.Windows.Forms.Panel(); + this.filestogenerateTextbox = new System.Windows.Forms.TextBox(); + this.ftogeneratelable = new System.Windows.Forms.Label(); + this.filesprocessedlabel = new System.Windows.Forms.Label(); + this.populate_drive = new System.Windows.Forms.Button(); + this.sidepanel.SuspendLayout(); this.SuspendLayout(); // // btnDocuments @@ -53,6 +60,7 @@ private void InitializeComponent() this.btnPictures.TabIndex = 1; this.btnPictures.Text = "Create Fake Pictures"; this.btnPictures.UseVisualStyleBackColor = true; + this.btnPictures.Click += new System.EventHandler(this.btnPictures_Click); // // btnVideos // @@ -71,12 +79,72 @@ private void InitializeComponent() this.btnMusic.TabIndex = 3; this.btnMusic.Text = "Create Fake Music"; this.btnMusic.UseVisualStyleBackColor = true; + this.btnMusic.Click += new System.EventHandler(this.btnMusic_Click); + // + // progressBar + // + this.progressBar.Location = new System.Drawing.Point(12, 143); + this.progressBar.Name = "progressBar"; + this.progressBar.Size = new System.Drawing.Size(317, 10); + this.progressBar.TabIndex = 4; + // + // sidepanel + // + this.sidepanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.sidepanel.Controls.Add(this.filestogenerateTextbox); + this.sidepanel.Controls.Add(this.ftogeneratelable); + this.sidepanel.Location = new System.Drawing.Point(230, 12); + this.sidepanel.Name = "sidepanel"; + this.sidepanel.Size = new System.Drawing.Size(99, 59); + this.sidepanel.TabIndex = 5; + // + // filestogenerateTextbox + // + this.filestogenerateTextbox.Location = new System.Drawing.Point(7, 27); + this.filestogenerateTextbox.Name = "filestogenerateTextbox"; + this.filestogenerateTextbox.Size = new System.Drawing.Size(83, 20); + this.filestogenerateTextbox.TabIndex = 1; + this.filestogenerateTextbox.Text = "50"; + this.filestogenerateTextbox.TextChanged += new System.EventHandler(this.filestogenerateTextbox_TextChanged); + // + // ftogeneratelable + // + this.ftogeneratelable.AutoSize = true; + this.ftogeneratelable.Location = new System.Drawing.Point(6, 8); + this.ftogeneratelable.Name = "ftogeneratelable"; + this.ftogeneratelable.Size = new System.Drawing.Size(85, 13); + this.ftogeneratelable.TabIndex = 0; + this.ftogeneratelable.Text = "Files to generate"; + // + // filesprocessedlabel + // + this.filesprocessedlabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.filesprocessedlabel.AutoSize = true; + this.filesprocessedlabel.Location = new System.Drawing.Point(12, 127); + this.filesprocessedlabel.Name = "filesprocessedlabel"; + this.filesprocessedlabel.Size = new System.Drawing.Size(0, 13); + this.filesprocessedlabel.TabIndex = 6; + this.filesprocessedlabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // populate_drive + // + this.populate_drive.Location = new System.Drawing.Point(230, 70); + this.populate_drive.Name = "populate_drive"; + this.populate_drive.Size = new System.Drawing.Size(99, 23); + this.populate_drive.TabIndex = 7; + this.populate_drive.Text = "Populate Drive"; + this.populate_drive.UseVisualStyleBackColor = true; + this.populate_drive.Click += new System.EventHandler(this.populate_drive_Click); // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(234, 138); + this.ClientSize = new System.Drawing.Size(334, 158); + this.Controls.Add(this.populate_drive); + this.Controls.Add(this.filesprocessedlabel); + this.Controls.Add(this.sidepanel); + this.Controls.Add(this.progressBar); this.Controls.Add(this.btnMusic); this.Controls.Add(this.btnVideos); this.Controls.Add(this.btnPictures); @@ -84,7 +152,11 @@ private void InitializeComponent() this.Name = "MainForm"; this.ShowIcon = false; this.Text = "FakeFileCreator"; + this.Load += new System.EventHandler(this.MainForm_Load); + this.sidepanel.ResumeLayout(false); + this.sidepanel.PerformLayout(); this.ResumeLayout(false); + this.PerformLayout(); } @@ -94,6 +166,12 @@ private void InitializeComponent() private System.Windows.Forms.Button btnPictures; private System.Windows.Forms.Button btnVideos; private System.Windows.Forms.Button btnMusic; + private System.Windows.Forms.ProgressBar progressBar; + private System.Windows.Forms.Panel sidepanel; + private System.Windows.Forms.TextBox filestogenerateTextbox; + private System.Windows.Forms.Label ftogeneratelable; + private System.Windows.Forms.Label filesprocessedlabel; + private System.Windows.Forms.Button populate_drive; } } diff --git a/FakeFileCreator/MainForm.cs b/FakeFileCreator/MainForm.cs index 8a8ee99..c097d72 100644 --- a/FakeFileCreator/MainForm.cs +++ b/FakeFileCreator/MainForm.cs @@ -1,12 +1,9 @@ using System; +using System.Collections.Concurrent; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; using System.IO; using System.Linq; using System.Net; -using System.Text; using System.Threading.Tasks; using System.Windows.Forms; @@ -15,67 +12,329 @@ namespace FakeFileCreator public partial class MainForm : Form { private Random rand = new Random(); + private List cachedWords = new List(); private static string EnglishWordListURL = @"https://raw.githubusercontent.com/dwyl/english-words/master/words_alpha.txt"; + private string tempWordFile; public MainForm() { InitializeComponent(); + tempWordFile = Path.Combine(Path.GetTempPath(), "words.txt"); + Load += MainForm_Load; } - private void btnDocuments_Click(object sender, EventArgs e) + private async void MainForm_Load(object sender, EventArgs e) { - List extensions = new List { ".txt", ".docx", ".pdf", ".xls", ".xlxs", ".ppt", ".pptx", ".odt" }; + await DownloadAndCacheWordListAsync(); + } + + private async Task DownloadAndCacheWordListAsync() + { + progressBar.Invoke((Action)(() => + { + progressBar.Value = 0; + progressBar.Maximum = 100; + })); - Console.WriteLine("Looking for words.txt..."); - if (!File.Exists("words.txt")) + if (!File.Exists(tempWordFile)) { - var client = new WebClient(); - Console.WriteLine("Getting words from github..."); - string data = client.DownloadString(EnglishWordListURL); - using (StreamWriter sw = new StreamWriter("words.txt")) { sw.Write(data); } + using (var client = new WebClient()) + { + client.DownloadProgressChanged += (s, e) => + { + progressBar.Invoke((Action)(() => + { + progressBar.Value = e.ProgressPercentage; + })); + }; + + await client.DownloadFileTaskAsync(EnglishWordListURL, tempWordFile); + } } - List words = new List(); - using (StreamReader sr = new StreamReader("words.txt")) + while (true) { - while (!sr.EndOfStream) + try + { + using (FileStream fs = File.Open(tempWordFile, FileMode.Open, FileAccess.Read, FileShare.Read)) + using (StreamReader sr = new StreamReader(fs)) + { + cachedWords = sr.ReadToEnd().Split(new[] { "\r\n", "\n" }, StringSplitOptions.RemoveEmptyEntries) + .Where(l => l.Length > 2 && l.Length < 14) + .ToList(); + } + break; + } + catch (IOException) { - words.Add(sr.ReadLine()); + await Task.Delay(100); } } - Console.WriteLine("Words count: " + words.Count); + progressBar.Invoke((Action)(() => progressBar.Value = 0)); + } + + private int GetFileCount() + { + if (string.IsNullOrWhiteSpace(filestogenerateTextbox.Text)) + { + MessageBox.Show("Enter a number of files to generate"); + return -1; + } + + if (int.TryParse(filestogenerateTextbox.Text, out int v)) + return v; + + MessageBox.Show("Invalid number"); + return -1; + } + + private string GenerateRandomFilename(List extensions) + { + int wordsLong = rand.Next(2, 5); + string[] w = new string[wordsLong]; + for (int i = 0; i < wordsLong; i++) + w[i] = cachedWords[rand.Next(cachedWords.Count)]; + + return string.Join("_", w) + extensions[rand.Next(extensions.Count)]; + } + + private string GenerateRandomFolderName() + { + int wordsLong = rand.Next(1, 3); + string[] w = new string[wordsLong]; + for (int i = 0; i < wordsLong; i++) + w[i] = cachedWords[rand.Next(cachedWords.Count)]; + + return string.Join(" ", w); + } + + private void GenerateBinaryFile(string path, int size) + { + byte[] data = new byte[size]; + rand.NextBytes(data); + File.WriteAllBytes(path, data); + } + + private async Task GenerateFilesAsync(string rootFolder, List extensions, int count) + { + if (cachedWords.Count == 0) + await DownloadAndCacheWordListAsync(); + + Directory.CreateDirectory(rootFolder); - if(words.Count == 0) return; - if(extensions.Count == 0) return; + progressBar.Invoke((Action)(() => + { + progressBar.Value = 0; + progressBar.Maximum = count; + })); - int filesToGenerate = rand.Next(10, 50); - Console.WriteLine($"Generating [{filesToGenerate}] files..."); - for (int i = 0; i < filesToGenerate; i++) + filesprocessedlabel.Invoke((Action)(() => { - string filename = ""; - int wordsLong = rand.Next(1, 4); - for (int j = 0; j < wordsLong; j++) + filesprocessedlabel.Text = $"0 / {count}"; + })); + + int maxThreads = Math.Max(Environment.ProcessorCount - 2, 1); + var completedCount = 0; + + List folders = new List { rootFolder }; + + int folderCount = Math.Max(1, count / 10); + for (int i = 0; i < folderCount; i++) + { + string parent = folders[rand.Next(folders.Count)]; + string folderPath = Path.Combine(parent, GenerateRandomFolderName()); + Directory.CreateDirectory(folderPath); + folders.Add(folderPath); + } + + await Task.Run(() => + { + ParallelOptions options = new ParallelOptions { MaxDegreeOfParallelism = maxThreads }; + + while (completedCount < count) { - int wordToGet = rand.Next(0, words.Count); - Console.WriteLine("Word to get: " + wordToGet); - filename += words[wordToGet] + " "; + Parallel.For(0, count - completedCount, options, _ => + { + string folder = folders[rand.Next(folders.Count)]; + + string filename = GenerateRandomFilename(extensions); + string path = Path.Combine(folder, filename); + + bool created = false; + lock (rand) + { + if (!File.Exists(path)) + { + GenerateBinaryFile(path, rand.Next(50000, 8000000)); + created = true; + } + } + + if (created) + { + int progress = System.Threading.Interlocked.Increment(ref completedCount); + progressBar.Invoke((Action)(() => progressBar.Value = progress)); + filesprocessedlabel.Invoke((Action)(() => + filesprocessedlabel.Text = $"{progress} / {count}" + )); + } + }); } - filename += extensions[rand.Next(0, extensions.Count)]; + }); + } - Console.WriteLine($"Filename: {filename}"); + private async void btnDocuments_Click(object sender, EventArgs e) + { + int count = GetFileCount(); + if (count <= 0) return; - string myDocs = Path.Combine(Environment.ExpandEnvironmentVariables("%userprofile%"), "Documents"); - FileInfo fInf = new FileInfo(myDocs + "/" + filename); - if (fInf.Exists) continue; + var ext = new List { ".txt", ".docx", ".pdf", ".xls", ".xlsx", ".ppt", ".pptx", ".odt", ".rtf" }; + string folder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "FakeDocs"); - fInf.Create().Close(); + await GenerateFilesAsync(folder, ext, count); + MessageBox.Show($"Created {count} fake documents"); + } - StreamWriter sw = new StreamWriter(fInf.OpenWrite()); - sw.Write("NULL_NULL_NULL"); - sw.Flush(); - sw.Close(); + private async void btnPictures_Click(object sender, EventArgs e) + { + int count = GetFileCount(); + if (count <= 0) return; + + var ext = new List { ".png", ".jpg", ".jpeg" }; + string folder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures), "FakePics"); + + await GenerateFilesAsync(folder, ext, count); + MessageBox.Show($"Created {count} fake pictures"); + } + + private async void btnVideos_Click(object sender, EventArgs e) + { + int count = GetFileCount(); + if (count <= 0) return; + + var ext = new List { ".mp4", ".mov", ".avi", ".mkv" }; + string folder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyVideos), "FakeVideos"); + + await GenerateFilesAsync(folder, ext, count); + MessageBox.Show($"Created {count} fake videos"); + } + + private async void btnMusic_Click(object sender, EventArgs e) + { + int count = GetFileCount(); + if (count <= 0) return; + + var ext = new List { ".mp3", ".wav", ".flac" }; + string folder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyMusic), "FakeMusic"); + + await GenerateFilesAsync(folder, ext, count); + MessageBox.Show($"Created {count} fake music files"); + } + + private void filestogenerateTextbox_TextChanged(object sender, EventArgs e) + { + string t = filestogenerateTextbox.Text; + string filtered = new string(t.Where(char.IsDigit).ToArray()); + if (t != filtered) + { + int pos = filestogenerateTextbox.SelectionStart; + filestogenerateTextbox.Text = filtered; + filestogenerateTextbox.SelectionStart = Math.Min(pos, filtered.Length); + } + } + + private async void populate_drive_Click(object sender, EventArgs e) + { + using (var fbd = new FolderBrowserDialog()) + { + fbd.Description = "Select a drive/folder to fill (C: is blocked)"; + if (fbd.ShowDialog() != DialogResult.OK) return; + + string rootPath = fbd.SelectedPath; + if (Path.GetPathRoot(rootPath).ToUpper() == @"C:\") + { + MessageBox.Show("Populating C: drive is blocked for safety. Choose another drive."); + return; + } + + var driveInfo = new DriveInfo(rootPath); + long totalSize = driveInfo.TotalSize; + long targetFreeSpace = (long)(totalSize * 0.1); + long currentFreeSpace = driveInfo.AvailableFreeSpace; + + if (MessageBox.Show($"Are you sure you want to fill {rootPath}? This will fill until ~90% of the drive is used!", "Confirm", MessageBoxButtons.YesNo) != DialogResult.Yes) + return; + + List<(string type, List extensions)> fileTypes = new List<(string, List)> + { + ("Documents", new List { ".txt", ".docx", ".pdf", ".xls", ".xlsx", ".ppt", ".pptx", ".odt", ".rtf" }), + ("Pictures", new List { ".png", ".jpg", ".jpeg" }), + ("Videos", new List { ".mp4", ".mov", ".avi", ".mkv" }), + ("Music", new List { ".mp3", ".wav", ".flac" }) + }; + + await DownloadAndCacheWordListAsync(); + + int maxThreads = Math.Max(Environment.ProcessorCount * 2, 4); + var folders = new List { rootPath }; + + await Task.Run(() => + { + ParallelOptions options = new ParallelOptions { MaxDegreeOfParallelism = maxThreads }; + + while (currentFreeSpace > targetFreeSpace) + { + Parallel.For(0, maxThreads, options, _ => + { + lock (rand) + { + var type = fileTypes[rand.Next(fileTypes.Count)]; + string folder = folders[rand.Next(folders.Count)]; + if (rand.NextDouble() < 0.25) + { + folder = Path.Combine(folders[rand.Next(folders.Count)], GenerateRandomFolderName()); + Directory.CreateDirectory(folder); + folders.Add(folder); + } + + int size = rand.Next(1_000_000, 8_000_000); + GenerateBinaryFile(Path.Combine(folder, GenerateRandomFilename(type.extensions)), size); + } + }); + + currentFreeSpace = new DriveInfo(rootPath).AvailableFreeSpace; + long usedSpace = totalSize - currentFreeSpace; + + int progressValue = (int)((usedSpace * 100L) / totalSize); + + progressBar.Invoke((Action)(() => + { + progressBar.Value = Math.Min(100, progressValue); + })); + + filesprocessedlabel.Invoke((Action)(() => + { + filesprocessedlabel.Text = $"{FormatBytes(usedSpace)} / {FormatBytes(totalSize)}"; + })); + } + }); + + MessageBox.Show("Drive filling completed."); + } + } + + private string FormatBytes(long bytes) + { + string[] sizes = { "B", "KB", "MB", "GB", "TB" }; + double len = bytes; + int order = 0; + while (len >= 1024 && order < sizes.Length - 1) + { + order++; + len /= 1024; } + return $"{len:0.##} {sizes[order]}"; } } } diff --git a/GiftcardGenerator/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/GiftcardGenerator/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache index 1fb44616702c8730c22afcd2852be9bc5931753d..3431654283693c8a23970b264bf64d8da4e7ba14 100644 GIT binary patch delta 528 zcma)&-AV#M6vuaLkutxw3|A@=yl${e!tTN}qcTYagS8lS($Sq=+Z{hZB)aGc<_UU) zULfeE*XTOvrZ;GIwM(J7ncw+wICJLzoOx9qqf3$`dEtl{v?arquFDXQu@n^cJbR>7 zZEV>Z((zb3F`EO54Q6YngcSx2t=vSkfe5RZrrsk=D_LeATZ~{^D`Uop(YB#Ihs=Um ziABSX`+e9njeF82ycDYPuRsJKmuf*jzY5h?vZjTdg@?i-o(^pYi$PaZbsh}|z?~pX z77cAzeTRLZ<0xKJ{D8Xjp(vo~&~lCH&MdbwN6(Iz zchs%*wMl^(tb|x6Z<+LrVLIh6>L!0zbGw1bH5%oKj*E!m>E(hX=0R{2NbqjV?~x?_ zrWSUF|7ibNO#_d!Bma!u@}z$|9f8GMC7!p$gCo=G#Sh>i-1iRMOQtr_eS(uPl}znr I{yrl80;IvF&;S4c literal 7301 zcmeHMZBH9V5Vm>QU`W!KrU`j>+O$nt_iBd_l1O|Y7$>L+Lbd~yI7HTWW3%Dz*4^C$ zT!hqr(qB;ZC$=-^Hz0)e!=025KIHMTFZ1lo&E7pTPNh?+)IWI9H(eJ;P`Gb}qokG% zW33Ava<6JaS4e9~`o0WSO3V4&Iw&nUuq+*(-og!2ou zYjPKYg?eGOG1r)H6pQX$fzR@Bf_(M~q?e)aT*6xk3@F*!P`uRwWmULZ30k4iH*oO{ z?s;+_+(oUyuY2v~0|No=N?*d+OEPGPW?6V}&EbJ7TyCH@lX~^7M(BBE#eLY9YPUC3 z<8>UndSa|BJs0i0OPw{Ynqd0Ns$pG&Sw$uKfoKL&K?xchU9l2qgZmrouA}&e^C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NpHj)!+_UauX^iUZ?0j}%E%_P# zj*X?rlk~NwN!UkR_^$N;%L&`{JZmN_!7-%B+2lWq7=HHVlh<{wjNK45YZeFQZ$1#& zA4V1inQ^%Y#vljNHd6YqV9lYf8tTGMHH;L}Vc?K{cD%a$9lE+rBGc`qBNe?R?mFuH zVwcG`y>9kKvCdQ@bi(HdM$6rAunwaPK^`GUB?6Ex;Z+dgJVqQ79ZrrJW|P1*>&1N` z@)yz0Fhr(3n?{^^gfoPOC!0P96VB=hqU}Y8MicrHAs{-4oML$FYvF9ZLa2l2px$xe z$|G&(rSf$M_!I$Ibb!D6UI_Cw!c?P$dCkQigq5H-(tt+|cvN3A2K^30!gu~YW@>yr zvak7{FuH%(N*!X$KZ)*J<8mftkS3v|=|?jKy!MO;4wc!q^U9`nC(;{9PTaMqGI1p=39QxqA{m7?f?jJ2Mlm^s(); + + for (int i = 0; i < count; i++) + { + string proto = rand.Next(0, 2) == 0 ? "TCP" : "UDP"; + string localIp = lan + ":" + rand.Next(40000, 60000); + string foreignIp = rand.Next(10, 255) + "." + rand.Next(0, 255) + "." + rand.Next(0, 255) + "." + rand.Next(0, 255) + ":" + rand.Next(40, 9000); + + string state; + if (proto == "UDP") + { + state = "LISTENING"; + } + else + { + int r = rand.Next(0, 3); + if (r == 0) state = "ESTABLISHED"; + else if (r == 1) state = "TIME_WAIT"; + else state = "CLOSE_WAIT"; + } + + string line = " " + proto.PadRight(6) + " " + localIp.PadRight(22) + " " + foreignIp.PadRight(22) + " " + state; + entries.Add(line); + Console.WriteLine(line); + Thread.Sleep(250); + } + + Console.WriteLine(); + Thread.Sleep(2500); + Console.WriteLine("Securing system, please wait..."); + Thread.Sleep(1000); + + int total = entries.Count; + + for (int i = 0; i < total; i++) + { + int width = 100; + int progress = (i + 1) * width / total; + + Console.Write("["); + Console.Write(new string('#', progress)); + Console.Write(new string('-', width - progress)); + Console.Write("] " + ((i + 1) * 100 / total) + "%"); + Console.SetCursorPosition(0, Console.CursorTop); + Thread.Sleep(rand.Next(80, 160)); + } + + Thread.Sleep(500); + Console.Clear(); + Console.ForegroundColor = ConsoleColor.Green; + + Console.WriteLine(); + Console.WriteLine("No foreign addresses found. Computer is secure from hackers!"); + Console.WriteLine(); + #if DEBUG Console.ReadLine(); #endif diff --git a/netstat/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/netstat/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache index 2c31b47a54a7593d2f011f3036251731df6ce528..c19187472008d86182b19273d8935ef836796797 100644 GIT binary patch literal 1808 zcmcJQ-;2~R5XVVGy!=>`*^7c59q_ZWntKcn*qNE%*R*E7hlu;CB zdxxM%YAghiO-zxDAtRxg0giSE+6kjw^w=6%AKQIUaKVP>pL8`q5zI%R1nJz`i5dJ`5-youXau^GZHw>4# zHR{@LkNU-7&TIwPp&%0$I2yaJv%?fB;n40cW}Y2eX5k2k`}`QT{1|p}MwXsxqh0;@ zFlF1IKJnnGQ@<2{!#fS=kRdIE_GFX59MC4t|KgkcM{i8=v-2hcCn`M`3Z~$U+;l76 zf!Gnw_!1s^zvEQG_bBz1GtNqXcD%fIPz=BNw0gFEY7_o63?^OeB+V%@Xvg}>33=k5 PPs!Qo*_-pWK7IQeXB2-H literal 6825 zcmeHMZBH9V5VpZwFoYCSN(dyW)23>Yx+golN8$sqaf1>NvK?9pTV#DVHXH74-Q7LF zMf{fjf~r5UojJep7FsDjDIa{6$LoEWXJ>YH{p>grjYJ~<;6tDE+#Nz;Z*xluC2HE- z&ba@V0WBspK9=#f7(?SvJ%3N+q+tqkReM9{5@^Czagws}8r`LbD`} zz+11T7ivqjm0BiaFQwT68zIQmPawVaxnmRFmZw3A#;=k!8X(OAlUrWH*XjWde!v_@ zoPfQd6u4EVxp}I=qgkm5?41=}jo0(sff;^EKab@{+l5BIHr0sl=+- zHhrlrFB}`~eN2@lChMTP!-{@Yf!;wS>M5^#LP8E|3|+D1DUI{%&90^R#qFJ1>RMgz z^P5#Xx>kR2RMJ5^mA*2~9G75eAvvhYhOL<_0+ZI^F4KonJCQ_D+g)>lw~8c6U^RbC1gm3~A`_hhFwaEmcy3>!uyGK_L4 z8jTwGMj09UbEMc*8e9xdTwhC5z?r{*2a;RnJ9O5E%>Mo@U2sS2F~^5p#^r~X-L6F~ zxmQmmU1bUB@M>?5E&lH%p=h@nA%_UnhU5+xoSA4V}2k5O@i1k!;>{0<8I7$p%WF-Bq> z#h7syWyF|3kvl82nbWHx66q5rq1+|AWpih<)a8(=<3)4De3|M{&^F!NJUut=p{C>P ztMYq={IhHc&lBaM@TCRi0yKmwBg;k7`I;g1mF1$v+$!U`B!qLsb=d<=T&*msAF;aw zOhGvZ3Mps_X;J}{aE`m2xW|c1i&=*d|B6hRMDg(QY&+DyHESb*J*KHgvTIN>u*aAp z1?^s6V>#w3?ikZp8pGPOxsYDSti`{jud#-KV$8yZH9mkjrN^lAZ zS`G5JL05pcpY5BCM#DtE;#I+zLxmg_A|I^dwICVX5|YnOSC^lo``U~#*7HoEuoczTt4U7nsG`c0P*<7X7%ES+JZ>Pje4 mk!KdOks>DodXF%7f>5A1p=bE7!O8Yt|CbC-wr(D~GX5_T^4zKb diff --git a/netstat/obj/Release/netstat.csproj.CoreCompileInputs.cache b/netstat/obj/Release/netstat.csproj.CoreCompileInputs.cache index 48cbfef..424e5de 100644 --- a/netstat/obj/Release/netstat.csproj.CoreCompileInputs.cache +++ b/netstat/obj/Release/netstat.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -ccf839991915f9697dd8d887060e5eafa0df1b69 +979fc59c1f2afcc3443738cd70ff09bf60f7ecb8fbff0eec3eb8b752a83b3e04 diff --git a/netstat/obj/Release/netstat.csproj.FileListAbsolute.txt b/netstat/obj/Release/netstat.csproj.FileListAbsolute.txt index 78a2d7b..219ee6b 100644 --- a/netstat/obj/Release/netstat.csproj.FileListAbsolute.txt +++ b/netstat/obj/Release/netstat.csproj.FileListAbsolute.txt @@ -5,3 +5,10 @@ C:\Users\conno\Source\Repos\ConnorBaxter\ScambaitToolkit\netstat\obj\Release\net C:\Users\conno\Source\Repos\ConnorBaxter\ScambaitToolkit\netstat\obj\Release\netstat.exe C:\Users\conno\Source\Repos\ConnorBaxter\ScambaitToolkit\netstat\obj\Release\netstat.pdb C:\Users\conno\Source\Repos\ConnorBaxter\ScambaitToolkit\netstat\obj\Release\netstat.csprojAssemblyReference.cache +C:\Users\alex\Documents\GitHub\ScambaitToolkit\netstat\bin\Release\netstat.exe.config +C:\Users\alex\Documents\GitHub\ScambaitToolkit\netstat\bin\Release\netstat.exe +C:\Users\alex\Documents\GitHub\ScambaitToolkit\netstat\bin\Release\netstat.pdb +C:\Users\alex\Documents\GitHub\ScambaitToolkit\netstat\obj\Release\netstat.csproj.AssemblyReference.cache +C:\Users\alex\Documents\GitHub\ScambaitToolkit\netstat\obj\Release\netstat.csproj.CoreCompileInputs.cache +C:\Users\alex\Documents\GitHub\ScambaitToolkit\netstat\obj\Release\netstat.exe +C:\Users\alex\Documents\GitHub\ScambaitToolkit\netstat\obj\Release\netstat.pdb diff --git a/tree/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/tree/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache index c9e1dec2f5ca65043e06d0b933047a5c46ec0af9..9b0c30f18b534a2ed6a7e052a00a0c5671fc15f2 100644 GIT binary patch literal 1935 zcmcJQ+lv!16vnHTKFInaf+9ZjafK4PuDI@kVC}^UT9&peK17yG=5!i2mzt#Ql%fB- zCo?i-A1h{HGM8k&@0{e!FV7z}8jTj&3a!#6Nu_KO$f0q9Z!h~-^u~d8lu5|x!0@#K z?H&Cr{CJ(v8D}bC!q1J7cf!-&YDKuw3z2;~^2;f>oMH%P-CJ(~P(}6rQR1Rj5U6l% zO=g*DkAwu*KF#01drhaX01KK!yXPFJL<(^9o8ZO7CyaK{b1Q8z zx7(Pxq5d+a{scT3dtcTXk7@Kn$*>|(lL;PQh5j9k5HgJic-}-wDkwKc>&hlrRYwai zFN!|XsYscJzYy4!h}b_Z#zOmR=9e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