Skip to content

Instantly share code, notes, and snippets.

View SergiusTheBest's full-sized avatar

Sergey Podobry SergiusTheBest

View GitHub Profile
@mmozeiko
mmozeiko / etw_createfile.c
Last active July 21, 2024 20:36
Monitor which files are accessed with ETW
// this code will work only when compiled as 64-bit code, and on Windows 10
// older Windows version might require different structure definitions
#define NOMINMAX
#define INITGUID
#include <windows.h>
#include <evntrace.h>
#include <evntcons.h>
#pragma comment (lib, "shell32.lib")
@PeteGoo
PeteGoo / Send-UdpDatagram.ps1
Last active July 23, 2024 13:28
Sending UDP datagrams in powershell
function Send-UdpDatagram
{
Param ([string] $EndPoint,
[int] $Port,
[string] $Message)
$IP = [System.Net.Dns]::GetHostAddresses($EndPoint)
$Address = [System.Net.IPAddress]::Parse($IP)
$EndPoints = New-Object System.Net.IPEndPoint($Address, $Port)
$Socket = New-Object System.Net.Sockets.UDPClient