This file contains hidden or 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 ( | |
| "crypto/aes" | |
| "crypto/cipher" | |
| "crypto/rand" | |
| "encoding/base64" | |
| "fmt" | |
| "io" | |
| ) |
This file contains hidden or 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
| uint16_t crc16(char* pData, int length) | |
| { | |
| uint8_t i; | |
| uint16_t wCrc = 0xffff; | |
| while (length--) { | |
| wCrc ^= *(unsigned char *)pData++ << 8; | |
| for (i=0; i < 8; i++) | |
| wCrc = wCrc & 0x8000 ? (wCrc << 1) ^ 0x1021 : wCrc << 1; | |
| } | |
| return wCrc & 0xffff; |
This file contains hidden or 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
| /* | |
| * Gets Thread token for current thread. | |
| * Returns NULL on failure. | |
| */ | |
| HANDLE GetCurrentThreadToken() | |
| { | |
| HANDLE hToken; | |
| if (!OpenThreadToken( |
This file contains hidden or 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" | |
| import "os" | |
| import "log" | |
| import "bytes" | |
| import "strings" | |
| import "time" | |
| import "compress/gzip" | |
| import "encoding/base64" |
This file contains hidden or 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 <winternl.h> | |
| #pragma comment(lib,"ntdll.lib") | |
| EXTERN_C NTSTATUS NTAPI NtTerminateProcess(HANDLE,NTSTATUS); | |
| EXTERN_C NTSTATUS NTAPI NtReadVirtualMemory(HANDLE,PVOID,PVOID,ULONG,PULONG); | |
| EXTERN_C NTSTATUS NTAPI NtWriteVirtualMemory(HANDLE,PVOID,PVOID,ULONG,PULONG); | |
| EXTERN_C NTSTATUS NTAPI NtGetContextThread(HANDLE,PCONTEXT); |
This file contains hidden or 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
| #define WIN32_LEAN_AND_MEAN | |
| #include <cstdio> | |
| #include <cstdlib> | |
| #include <Windows.h> | |
| HANDLE g_event; | |
| DWORD WINAPI ThreadFunc(LPVOID); |
This file contains hidden or 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
| app.filter('bytes', function() { | |
| return function(bytes, precision) { | |
| if (isNaN(parseFloat(bytes)) || !isFinite(bytes)) return '-'; | |
| if (typeof precision === 'undefined') precision = 1; | |
| var units = ['bytes', 'kB', 'MB', 'GB', 'TB', 'PB'], | |
| number = Math.floor(Math.log(bytes) / Math.log(1024)); | |
| return (bytes / Math.pow(1024, Math.floor(number))).toFixed(precision) + ' ' + units[number]; | |
| } | |
| }); |