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
#!/bin/bash | |
# Author: kings_way | |
# Version: 20230101 | |
# Build bootable image for BIOS and UEFI secure boot. | |
# Host OS: Ubuntu 20.04 | |
set -e | |
KERNEL_FILE="/boot/vmlinuz" | |
INITRD_FILE="/boot/initrd.img" |
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
use std::mem; | |
use std::io; | |
extern crate libc; | |
fn main() { | |
let interface_name = "lo"; | |
let socket_fd = match get_raw_socket(interface_name){ | |
Ok(fd) => fd, | |
Err(err) => { | |
eprintln!("Error, {}", err); |
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 <unistd.h> | |
#include <string.h> | |
#include <net/if.h> | |
#include <arpa/inet.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <linux/if_ether.h> | |
#include <linux/if_packet.h> |
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
#!/bin/sh | |
set -e | |
# The Config | |
server_addr ="x.x.x.x" | |
server_port="xxxxxx" | |
password="xxxxxx" | |
cipher="xxxxxx" | |
local_addr="0.0.0.0" |