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
Option Explicit | |
Private Const PAGE_EXECUTE_READWRITE = &H40 | |
Private Declare PtrSafe Sub MoveMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As LongPtr, Source As LongPtr, ByVal Length As Long) | |
Private Declare PtrSafe Function VirtualProtect Lib "kernel32" (lpAddress As LongPtr, ByVal dwSize As Long, ByVal flNewProtect As Long, lpflOldProtect As LongPtr) As Long | |
Private Declare PtrSafe Function GetModuleHandleA Lib "kernel32" (ByVal lpModuleName As String) As LongPtr | |
Private Declare PtrSafe Function GetProcAddress Lib "kernel32" (ByVal hModule As LongPtr, ByVal lpProcName As String) As LongPtr | |
Private Declare PtrSafe Function DialogBoxParam Lib "user32" Alias "DialogBoxParamA" (ByVal hInstance As Long, ByVal pTemplateName As LongPtr, ByVal hWndParent As Long, ByVal lpDialogFunc As LongPtr, ByVal dwInitParam As Long) As Integer | |
Dim HookBytes(0 To 11) As Byte | |
Dim OriginBytes(0 To 11) As Byte |
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
import expressBodyParser from 'body-parser'; | |
const reISO = /^(?:[+-]\d{6}|\d{4})-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/; | |
function dateReviver(key: string, value: any): any { | |
if(typeof value === 'string') { | |
// ざっくりチェック | |
if((value.length === 24 || value.length === 27) && value.endsWith('Z')) { | |
if(reISO.exec(value)) return new Date(value); | |
} |
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
#!/bin/bash | |
# Restore Flannel | |
DEVICE=flannel.1 | |
# Load Config | |
source /tmp/.flannel-save || exit | |
# Restore link | |
ip l a "$DEVICE" type vxlan id 1 local 192.168.210.252 dstport 8472 dev wg0 |