Skip to content

Commit 34447fe

Browse files
authored
Add files via upload
1 parent 6e4bee9 commit 34447fe

File tree

2 files changed

+1
-73
lines changed

2 files changed

+1
-73
lines changed

NoMoreCookiesService/NoMoreCookiesService/MainService.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
using System;
2-
using System.Collections.Generic;
3-
using System.ComponentModel;
4-
using System.Data;
52
using System.Diagnostics;
6-
using System.Linq;
73
using System.ServiceProcess;
8-
using System.Text;
9-
using System.Threading.Tasks;
104
using System.Runtime.InteropServices;
11-
using Microsoft.Win32;
125
using System.IO;
136

147
namespace NoMoreCookiesService
@@ -88,7 +81,6 @@ protected override void OnStart(string[] args)
8881
{
8982
if (ProcessInject.Id != Process.GetCurrentProcess().Id)
9083
{
91-
bool IsWow64 = false;
9284
IntPtr LoadLibraryA = GetProcAddress(GetModuleHandle("kernel32.dll"), "LoadLibraryA");
9385
IntPtr Allocation = VirtualAllocEx(ProcessInject.Handle, IntPtr.Zero, strlen(DllPath), 0x00001000 | 0x00002000, 0x04);
9486
WriteProcessMemory(ProcessInject.Handle, Allocation, DllPath, strlen(DllPath), 0);
Lines changed: 1 addition & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
1-
2-
using System;
3-
using System.Collections.Generic;
4-
using System.ComponentModel;
5-
using System.Linq;
6-
using System.Runtime.CompilerServices;
7-
using System.ServiceProcess;
8-
using System.Text;
1+
using System.ServiceProcess;
92
using System.Threading;
10-
using System.Threading.Tasks;
113

124
namespace NoMoreCookiesService
135
{
@@ -25,59 +17,3 @@ static void Main()
2517
}
2618
}
2719
}
28-
29-
/*
30-
using System;
31-
using System.Threading;
32-
using System.ServiceProcess;
33-
using System.Windows.Forms;
34-
35-
namespace NoMoreCookiesService
36-
{
37-
internal static class Program
38-
{
39-
private static NotifyIcon notifyIcon;
40-
41-
static void Main()
42-
{
43-
// NotifyIcon
44-
notifyIcon = new NotifyIcon();
45-
notifyIcon.Text = "NoMoreCookiesService";
46-
notifyIcon.Visible = true;
47-
48-
// context NotifyIcon
49-
ContextMenuStrip contextMenu = new ContextMenuStrip();
50-
ToolStripMenuItem exitMenuItem = new ToolStripMenuItem("Exit");
51-
exitMenuItem.Click += ExitMenuItem_Click;
52-
contextMenu.Items.Add(exitMenuItem);
53-
notifyIcon.ContextMenuStrip = contextMenu;
54-
55-
// double click
56-
notifyIcon.DoubleClick += NotifyIcon_DoubleClick;
57-
58-
// start service
59-
ServiceBase[] ServicesToRun;
60-
ServicesToRun = new ServiceBase[]
61-
{
62-
new MainService()
63-
};
64-
ServiceBase.Run(ServicesToRun);
65-
66-
// Infinity time
67-
Application.Run();
68-
}
69-
70-
private static void ExitMenuItem_Click(object sender, EventArgs e)
71-
{
72-
// Exit
73-
notifyIcon.Visible = false;
74-
notifyIcon.Dispose();
75-
Application.Exit();
76-
}
77-
78-
private static void NotifyIcon_DoubleClick(object sender, EventArgs e)
79-
{
80-
81-
}
82-
}
83-
} */

0 commit comments

Comments
 (0)