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
const r = require('request'); | |
const zlib = require('zlib'); | |
const text = require('text-encoding'); | |
const stream = require('stream'); | |
var interceptCallback = async (request: any, callback: any) => { | |
console.log(`intercepted ${request.method} ${request.url}`); | |
// TODO: support multiple upload data's | |
var options = { |
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
// rfc3986 | |
// https://datatracker.ietf.org/doc/html/rfc3986#section-1.1 | |
const queryParams = { param1: '@*/+~!@#$&*()=:/,;?+\'~!*()', param2: 'value2-_.!~*\'()' } | |
const queryString = new URLSearchParams(queryParams).toString() | |
console.log(queryString) |
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
<!--报错信息:--> | |
<!--runtime-core.esm-bundler.js?5c40:540 TypeError: Cannot read property 'style' of null--> | |
<!--at patchStyle (runtime-dom.esm-bundler.js?830f:104)--> | |
<!--at patchProp (runtime-dom.esm-bundler.js?830f:363)--> | |
<!--at patchProps (runtime-core.esm-bundler.js?5c40:4104)--> | |
<!--at patchElement (runtime-core.esm-bundler.js?5c40:4051)--> | |
<!--at processElement (runtime-core.esm-bundler.js?5c40:3871)--> | |
<!--at patch (runtime-core.esm-bundler.js?5c40:3788)--> | |
<!--at patchKeyedChildren (runtime-core.esm-bundler.js?5c40:4506)--> | |
<!--at patchChildren (runtime-core.esm-bundler.js?5c40:4449)--> |
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> | |
#pragma comment (linker, "/export:GetFileVersionInfoA=c:\\windows\\system32\\version.GetFileVersionInfoA,@1") | |
#pragma comment (linker, "/export:GetFileVersionInfoByHandle=c:\\windows\\system32\\version.GetFileVersionInfoByHandle,@2") | |
#pragma comment (linker, "/export:GetFileVersionInfoExW=c:\\windows\\system32\\version.GetFileVersionInfoExW,@3") | |
#pragma comment (linker, "/export:GetFileVersionInfoSizeA=c:\\windows\\system32\\version.GetFileVersionInfoSizeA,@4") | |
#pragma comment (linker, "/export:GetFileVersionInfoSizeExW=c:\\windows\\system32\\version.GetFileVersionInfoSizeExW,@5") | |
#pragma comment (linker, "/export:GetFileVersionInfoSizeW=c:\\windows\\system32\\version.GetFileVersionInfoSizeW,@6") | |
#pragma comment (linker, "/export:GetFileVersionInfoW=c:\\windows\\system32\\version.GetFileVersionInfoW,@7") | |
#pragma comment (linker, "/export:VerFindFileA=c:\\windows\\system32\\version.VerFindFileA,@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
# coding=utf-8 | |
import sys | |
import atexit | |
from pyVmomi import vim, vmodl | |
from pyVim.connect import SmartConnectNoSSL, Disconnect | |
from pyVim.task import WaitForTask | |
def poweron(content, name): |
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
#define _CRT_SECURE_NO_WARNINGS | |
#include <stdio.h> | |
#include <windows.h> | |
#include <Iphlpapi.h> | |
#include <tlhelp32.h> | |
#pragma comment(lib, "Iphlpapi.lib") | |
#pragma comment(lib, "WS2_32.lib") | |
int main() |
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 <ctime> | |
#include <string> | |
/* | |
使用Windows api实现数据压缩与解压缩 | |
重点说下RtlDecompressBuffer这个api,经过反复测试发现有2个问题 | |
1. 某些情况下虽然给的解压缓冲区很小,但此API并不会返回STATUS_BAD_COMPRESSION_BUFFER,而是返回了STATUS_SUCCESS。 | |
只是某些情况下会这样,并非100%复现,规律暂时没有找到,但我找到了一些可以复现的情况。 |
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
/* | |
by https://www.52pojie.cn/thread-930853-1-1.html | |
*/ | |
#include "windows.h" | |
#include "stdio.h" | |
#include <string> | |
#include <openssl/aes.h> | |
#pragma comment(lib, "libcrypto.lib") |
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
// test.cpp : 定义控制台应用程序的入口点。 | |
// | |
#include "stdafx.h" | |
#include <Windows.h> | |
#include <string> | |
#include <iostream> | |
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
// | |
// ref:https://stackoverflow.com/questions/7011071/detect-32-bit-or-64-bit-of-windows | |
// | |
#include <windows.h> | |
#include <shlwapi.h> | |
#pragma comment(lib, "shlwapi.lib") | |
bool is_x64_system() { | |
if (sizeof(void*) == 8) { |
NewerOlder