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
https://www.xitongku.com/ | |
https://msdn.itellyou.cn/ | |
https://bobpony.com/ | |
https://cdn.as212934.net/ |
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 <sys/ptrace.h> | |
#include <unistd.h> | |
int main(void) | |
{ | |
printf("Ptrace\n"); | |
int pid; | |
printf("please input pid:"); | |
scanf("%d",&pid); |
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
0.控制寄存器 | |
参考资料intel白皮书第三卷第二章第5小节 | |
控制寄存器(CR0,CR1(保留),CR2,CR3和CR4)决定处理器的工作模式和当前执行的任务的特性. | |
这些寄存器在所有32位模式和兼容模式下都是32位.在64位模式下,控制寄存器扩大到64位. | |
1.CR0寄存器 | |
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
fn = 0x401F60 | |
ollvm_tail = 0x405D4B | |
f_blocks = idaapi.FlowChart(idaapi.get_func(fn), flags=idaapi.FC_PREDS) | |
for block in f_blocks: | |
for succ in block.succs(): | |
if succ.start_ea == ollvm_tail: | |
print(hex(block.start_ea)) | |
idc.add_bpt(block.start_ea) |
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
/* | |
This is a k6 test script that imports the xk6-kafka and | |
tests Kafka with a 200 JSON messages per iteration. | |
*/ | |
import { check } from "k6"; | |
// import * as kafka from "k6/x/kafka"; | |
import { |
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
version: "3.8" | |
services: | |
mongodb: | |
image: mongo | |
container_name: mongodb | |
environment: | |
- MONGO_INITDB_ROOT_USERNAME=root | |
- MONGO_INITDB_ROOT_PASSWORD=pass12345 | |
volumes: | |
- mongodb_data:/data/db |
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
function xorDecrypt(cipherText, hexKey) { | |
// Convert the hexadecimal key to a byte array | |
let key = hexKey.match(/.{1,2}/g).map(byte => parseInt(byte, 16)); | |
// Decode the base64 encoded cipher text to a byte array | |
let cipherBytes = atob(cipherText).split('').map(char => char.charCodeAt(0)); | |
// XOR decryption | |
let plainBytes = cipherBytes.map((byte, index) => byte ^ key[index % key.length]); | |
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 { Injectable } from "@nestjs/common"; | |
import Kafka from 'node-rdkafka'; | |
import { ConfigService } from '@nestjs/config'; | |
@Injectable() | |
export class LibRdKafkaService { | |
private consumer: Kafka.KafkaConsumer; | |
private producer: Kafka.Producer; | |
constructor(private configService: ConfigService){ |
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 <iostream> | |
#include <stdio.h> | |
void EnableVirtualTerminalProcessing() { | |
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE); | |
DWORD dwMode = 0; | |
GetConsoleMode(hOut, &dwMode); | |
dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING; | |
SetConsoleMode(hOut, dwMode); |
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
git checkout --orphan orphan_data | |
git add -A | |
git commit -am "fix: orphaned" | |
git branch -D main | |
git branch -m main |
NewerOlder