This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xmltodict | |
import json | |
import sys | |
xmlfile = sys.argv[1] | |
jsonfile = xmlfile.replace('.xml', '.json') | |
with open(xmlfile, 'r') as file: | |
xml_string = file.read() | |
dict_data = xmltodict.parse(xml_string) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import impacket.dns | |
import socket | |
import select | |
import sys | |
import multiprocessing | |
import signal | |
# DNS server to connect to | |
dns_server = "8.8.8.8" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <windows.h> | |
#include <sddl.h> | |
#pragma comment(lib, "advapi32.lib") | |
void error(char *msg) { | |
fprintf(stderr, "%s" , msg); | |
exit(1); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os | |
import sys | |
import time | |
import win32api | |
import win32con | |
import win32security | |
import wmi # pip install wmi | |
import psutil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"os/exec" | |
"path/filepath" | |
"strings" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Rust has no APIs for random numbers. At all! If you want that you have | |
* to rely on 3rd party libraries. This is simply ridiculous. Relying on | |
* 3rd party libraries for cryptographically strong random numbers is one | |
* thing, however, there are many instances where you need a random number | |
* that doesn't have to be cryptographically strong, and any modern | |
* programming environment (or even not so modern) should offer this, | |
* Without having to rely on a 3rd party library!!! | |
* | |
* Because rust doesn't offer it, we'll just have to build our own. We'll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <stdio.h> | |
#define IOCTL_PROCESS_PROTECT_BY_PID CTL_CODE(FILE_DEVICE_UNKNOWN , 1, METHOD_BUFFERED, FILE_ANY_ACCESS) | |
#define IOCTL_PROCESS_UNPROTECT_BY_PID CTL_CODE(FILE_DEVICE_UNKNOWN , 2, METHOD_BUFFERED, FILE_ANY_ACCESS) | |
#define IOCTL_PROCESS_PROTECT_CLEAR CTL_CODE(FILE_DEVICE_UNKNOWN , 3, METHOD_BUFFERED, FILE_ANY_ACCESS) | |
int main(int argc, char **argv) { | |
if (argc < 2) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ntddk.h> | |
#include <windef.h> | |
#define DEVNAME L"\\Device\\ProcProt" | |
#define LINKNAME L"\\??\\ProcProt" | |
PVOID regHandle; | |
#define IOCTL_PROCESS_PROTECT_BY_PID CTL_CODE(FILE_DEVICE_UNKNOWN , 1, METHOD_BUFFERED, FILE_ANY_ACCESS) | |
#define IOCTL_PROCESS_UNPROTECT_BY_PID CTL_CODE(FILE_DEVICE_UNKNOWN , 2, METHOD_BUFFERED, FILE_ANY_ACCESS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Windows.h> | |
#include <stdio.h> | |
#include <winternl.h> | |
#include <ntstatus.h> | |
#define BEEPDEV L"\\Device\\Beep" | |
#define IOCTLCODE 0x10000 | |
typedef NTSTATUS(CALLBACK* NTOPENFILE)(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PIO_STATUS_BLOCK, ULONG, ULONG); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ZeroRead.cpp : This file contains the 'main' function. Program execution begins and ends there. | |
// | |
#include <Windows.h> | |
#include <stdio.h> | |
void hexdump(unsigned char* p, DWORD len) { | |
DWORD i; | |
for (i = 0; i < len; i++) { |
NewerOlder