const std = @import("std");
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
const a = gpa.allocator();
const hoge_str = try a.dupe(u8, "hogehoge");
defer a.free(hoge_str);
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
const std = @import("std"); | |
const stdin = std.io.getStdIn().reader(); | |
const stdout = std.io.getStdOut().writer(); | |
const ParseError = error{Fail}; | |
var index: usize = 0; | |
fn nextChar(buf: []const u8) u8 { | |
defer index += 1; | |
return buf[index]; |
dbg = binaryninja.debugger.debuggercontroller.DebuggerController(bv)
# get ecx value
val = dbg.get_reg_value("ecx")
dbg.step_into_and_wait()
dbg.step_into()
dbg.add_breakpoint(0xdeadbeef)
while dbg.go_and_wait():
Note that no blank lines are allowed.
def exec_patch():
addr = 0x224
addr2 = 0x224
count = 0x18d
while True:
d1 = bv.read(addr, 1)[0]
addr += 1
d1 -= 0x41
const std = @import("std");
const io = std.io;
const stdout = io.getStdOut().writer();
const N = 10;
pub fn main() !void {
var a = [_]i32{ 41, 24, 76, 11, 45, 64, 21, 69, 19, 36 };
make directory to share
sudo mkdir /home/share
sudo chmod 777 /home/share
sudo chown <user_name>:<user_name> -R /home/share
sudo smbpasswd -a <user_name>
add following lines
VBoxManage list vms
start vm with gui
VirtualBoxVM --startvm $VM_NAME > /dev/null 2>&1 &
start headless vm
systemctl edit --force --full getty@tty1
add below lines
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin user --noclear - $TERM
$ zig version
0.14.0-dev.1392+37df6ba86
const std = @import("std");
const fmt = std.fmt;
const debugPrint = std.debug.print;
const std = @import("std");
const fmt = std.fmt;
const debugPrint = std.debug.print;
pub fn main() !void {
const src = "hogehgoehgoe";
const ch = 'A';
var dst = [_]u8{0} ** 0x20;
NewerOlder