There are two parts to networking within QEMU:
- The virtual network device that is provided to the guest (e.g. a PCI network card).
- The network backend that interacts with the emulated NIC (e.g. puts packets onto the host's network).
| /* | |
| * This program is free software: you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation, either version 3 of the License, or | |
| * (at your option) any later version. | |
| */ | |
| #include <arpa/inet.h> | |
| #include <linux/if_packet.h> | |
| #include <stdio.h> |
| - Open Automator | |
| - File -> New -> Service | |
| - Change "Service Receives" to "files or folders" in "Finder" | |
| - Add a "Run Shell Script" action | |
| - Change "Pass input" to "as arguments" | |
| - Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*" | |
| - Save it as something like "Open in Visual Studio Code" |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #ifdef _MSC_VER | |
| #include <intrin.h> /* for rdtscp and clflush */ | |
| #pragma optimize("gt",on) | |
| #else | |
| #include <x86intrin.h> /* for rdtscp and clflush */ | |
| #endif |
| var GB2260 = { | |
| "110000": "北京市", | |
| "110100": "北京市市辖区", | |
| "110101": "北京市东城区", | |
| "110102": "北京市西城区", | |
| "110103": "北京市崇文区", | |
| "110104": "北京市宣武区", | |
| "110105": "北京市朝阳区", | |
| "110106": "北京市丰台区", | |
| "110107": "北京市石景山区", |
| #!/usr/bin/env python3 | |
| from msvcrt import get_osfhandle | |
| from ctypes.wintypes import * | |
| from ctypes import * | |
| import os | |
| import struct | |
| if sizeof(c_ulong) == sizeof(c_void_p): | |
| ULONG_PTR = c_ulong | |
| elif sizeof(c_ulonglong) == sizeof(c_void_p): |
| #!/usr/bin/env python | |
| # encoding: utf-8 | |
| #flag{Seize it, control it, and exploit it. Welcome to the House of Storm.} | |
| import itertools | |
| from hashlib import sha256 | |
| from pwn import remote, process, ELF | |
| from pwn import context | |
| from pwn import p32,p64,u32,u64 |
| #!/usr/bin/env python | |
| from pwn import * | |
| context(terminal=['tmux', 'splitw', '-h']) # horizontal split window | |
| # libc = ELF('./libc64.so') | |
| elf = ELF('./the_end') | |
| context(os='linux', arch=elf.arch) | |
| # context(log_level='debug') # output verbose log |
| #!/usr/bin/python3 | |
| import asyncio | |
| import time | |
| import socket | |
| import argparse | |
| import aiohttp | |
| class MyConnector(aiohttp.TCPConnector): |