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
| FROM ubuntu:20.04 | |
| ENV TZ=Europe/Moscow | |
| COPY install_deps.sh / | |
| RUN sh install_deps.sh |
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
| from scapy.all import * | |
| import time | |
| def discover_mac(target_ip): | |
| E = Ether(dst="ff:ff:ff:ff:ff:ff") | |
| A = ARP(op=1, pdst=target_ip) | |
| packet = E / A | |
| ans = srp(packet, timeout=2) | |
| mac = ans[0][0][1].hwsrc | |
| print('discovered {} MAC address: {}'.format(target_ip, mac)) |
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
| local table_new = require "table.new" | |
| local function payload() | |
| local _ = table_new(10, 0) | |
| for i = 1, 10 do | |
| _[i] = "memprof-str-"..i | |
| end | |
| _ = nil |
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
| local chunk = [[ | |
| function lua_global_f() | |
| local str = string.rep("%d", 100) | |
| end | |
| ]] | |
| for i=1,1000000 do | |
| local f, err = loadstring(chunk:format(i)) | |
| assert(f, err) | |
| f() |
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
| jit.off() | |
| local st, err = misc.memprof.start('memprof.bin') | |
| assert(st, err) | |
| local chunk = [[ | |
| function lua_global_f() | |
| local str = string.rep("%d", 100) | |
| end | |
| ]] |
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
| local misc = require("misc") | |
| local jit = require("jit") | |
| local os = require("os") | |
| local io = require("io") | |
| local N_RUNS = 15 | |
| local function avg(n, func) | |
| local sum = 0 | |
| for _ = 1, n do |
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
| // CXX_FLAGS: -std=c++17 -Wall -Wextra -fsanitize=address -fsanitize=undefined | |
| #include <iostream> | |
| #include <string_view> | |
| #include <deque> | |
| #ifndef NDEBUG | |
| #define LOG( smth ) smth | |
| #else | |
| #define LOG( smth ) if (0) smth |
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
| __asm__ (".intel_syntax noprefix\n" | |
| "sub rax, rdx\n" | |
| "sub rdx, 16\n" | |
| ".strloop:\n" | |
| "add rdx, 16\n" | |
| "movdqu xmm0, [rdx]\n" | |
| "pcmpistri xmm0, [rdx+rax], 0b00011000\n" | |
| "ja .strloop\n" | |
| "jc .not_eq\n" | |
| "mov rax, 1\n" |