Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
AdvDebug authored Jul 10, 2023
1 parent 6e4bee9 commit 34447fe
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 73 deletions.
8 changes: 0 additions & 8 deletions NoMoreCookiesService/NoMoreCookiesService/MainService.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using Microsoft.Win32;
using System.IO;

namespace NoMoreCookiesService
Expand Down Expand Up @@ -88,7 +81,6 @@ protected override void OnStart(string[] args)
{
if (ProcessInject.Id != Process.GetCurrentProcess().Id)
{
bool IsWow64 = false;
IntPtr LoadLibraryA = GetProcAddress(GetModuleHandle("kernel32.dll"), "LoadLibraryA");
IntPtr Allocation = VirtualAllocEx(ProcessInject.Handle, IntPtr.Zero, strlen(DllPath), 0x00001000 | 0x00002000, 0x04);
WriteProcessMemory(ProcessInject.Handle, Allocation, DllPath, strlen(DllPath), 0);
Expand Down
66 changes: 1 addition & 65 deletions NoMoreCookiesService/NoMoreCookiesService/Program.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.ServiceProcess;
using System.Text;
using System.ServiceProcess;
using System.Threading;
using System.Threading.Tasks;

namespace NoMoreCookiesService
{
Expand All @@ -25,59 +17,3 @@ static void Main()
}
}
}

/*
using System;
using System.Threading;
using System.ServiceProcess;
using System.Windows.Forms;
namespace NoMoreCookiesService
{
internal static class Program
{
private static NotifyIcon notifyIcon;
static void Main()
{
// NotifyIcon
notifyIcon = new NotifyIcon();
notifyIcon.Text = "NoMoreCookiesService";
notifyIcon.Visible = true;
// context NotifyIcon
ContextMenuStrip contextMenu = new ContextMenuStrip();
ToolStripMenuItem exitMenuItem = new ToolStripMenuItem("Exit");
exitMenuItem.Click += ExitMenuItem_Click;
contextMenu.Items.Add(exitMenuItem);
notifyIcon.ContextMenuStrip = contextMenu;
// double click
notifyIcon.DoubleClick += NotifyIcon_DoubleClick;
// start service
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
{
new MainService()
};
ServiceBase.Run(ServicesToRun);
// Infinity time
Application.Run();
}
private static void ExitMenuItem_Click(object sender, EventArgs e)
{
// Exit
notifyIcon.Visible = false;
notifyIcon.Dispose();
Application.Exit();
}
private static void NotifyIcon_DoubleClick(object sender, EventArgs e)
{
}
}
} */

0 comments on commit 34447fe

Please sign in to comment.