summaryrefslogtreecommitdiff
path: root/spell.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-02-03 20:49:52 -0300
committerGabriel Schneider <[email protected]>2026-02-03 20:49:52 -0300
commit19101e2358f00cc8c4bebb320181e05f96080564 (patch)
treec0a045a13cdadc06bb70e300a3df2bf6e47302ef /spell.zig
parent086f78bce8a895a718b0ed54aa37f844343761ed (diff)
downloadcodenomicon-19101e2358f00cc8c4bebb320181e05f96080564.tar.gz
codenomicon-19101e2358f00cc8c4bebb320181e05f96080564.zip
added spell.zig (mostly not working)
Diffstat (limited to 'spell.zig')
-rw-r--r--spell.zig28
1 files changed, 28 insertions, 0 deletions
diff --git a/spell.zig b/spell.zig
new file mode 100644
index 0000000..5439a6c
--- /dev/null
+++ b/spell.zig
@@ -0,0 +1,28 @@
+const std = @import("std");
+const config = @import("config");
+const cs = @import("capstone");
+const elfo = @import("./src/elfo.zig");
+
+var gpa: std.heap.GeneralPurposeAllocator(.{}) = .init;
+const alloc = gpa.allocator();
+
+// FIXME: call capstone on the sections
+// FIXME: missing reading the elf sections
+
+pub fn main() !void {
+ std.debug.print("abracadabra! -> {s}\n", .{config.vessel});
+ // std.debug.print("abracadabra! -> {x} {s}\n", .{ config.vessel_contents, config.vessel });
+
+ var child = std.process.Child.init(&.{config.vessel}, alloc);
+ try child.spawn();
+ child.stdin_behavior = .Pipe;
+ child.stdout_behavior = .Pipe;
+ child.stderr_behavior = .Pipe;
+
+ // var buf: [8]u8 = undefined;
+
+ // const bytes = try child.stdout.?.read(&buf);
+ // std.debug.print("stdout {x}\n", .{bytes});
+
+ _ = try child.wait();
+}