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 October 12, 2024 23:26
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 November 6, 2024 15:22
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