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 <string.h> | |
static const char store_file[] = "./todo_data.bin"; | |
static const char store_file_tmp[] = "./todo_data.bin.tmp"; | |
struct todo { | |
char data[255]; | |
}; |
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 <stdbool.h> | |
#include <stddef.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include <endian.h> | |
#ifdef __x86_64__ | |
#define NOLIBC_ARCH_HAS_U128 | |
#endif |
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 <string.h> | |
#include <stdlib.h> | |
#include "../io_ring_internal.h" | |
#include "../dns/dns_resolver.h" | |
#include "../dns/dns_ares.h" | |
#define MAX_TRY_COUNT 5 | |
struct dns_arg { |
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
// SPDX-License-Identifier: GPL-2.0-only | |
/* | |
* gwp2p - GNU/Weeb behind NAT Peer-to-Peer implementation. | |
* | |
* Copyright (C) 2023 Ammar Faizi <ammarfaizi2@gnuweeb.org> | |
* Copyright (C) 2023 Alviro Iskandar Setiawan <alviro.iskandar@gnuweeb.org> | |
* | |
* Thanks to Matthew Patrick <ThePhoenix576@gnuweeb.org> for the idea. | |
* | |
* Link: https://t.me/GNUWeeb/782010 |
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
<?php | |
if (!isset($_GET["key"]) || $_GET["key"] !== "secure your endpoint") { | |
http_response_code(403); | |
exit(0); | |
} | |
header("Content-Type: text/plain"); | |
$ip = $_SERVER["HTTP_CF_CONNECTING_IP"] ?? $_SERVER["REMOTE_ADDR"] ?? ""; | |
echo file_get_contents("https://freedns.afraid.org/dynamic/update.php?your_key=x&address=".urlencode($ip)); |
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
// SPDX-License-Identifier: GPL-2.0-only | |
/* | |
* tc-nat.c - A simple NAT implementation using BPF. | |
* | |
* Copyright (C) 2023 Muhammad Aldin Setiawan <aldinsetiawan99@gmail.com> | |
* Copyright (C) 2023 Ammar Faizi <ammarfaizi2@gnuweeb.org> | |
*/ | |
#include <linux/if_ether.h> | |
#include <linux/pkt_cls.h> | |
#include <linux/types.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
#include <iostream> | |
#include "tdx.h" | |
namespace tgbot { | |
void clean_pending_requests(Tdx *tdx) | |
{ | |
td_api::object_ptr<td_api::processChatJoinRequests> r; |
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
// SPDX-License-Identifier: GPL-2.0-only | |
/* | |
* Copyright (C) 2023 Ammar Faizi <ammarfaizi2@gnuweeb.org> | |
*/ | |
class GWRouter { | |
parse_title(body) | |
{ | |
let m = body.match(/<title>(.*?)<\/title>/s); | |
if (m) |
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 <ares.h> | |
#include <ares_dns.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <threads.h> | |
#include <stdbool.h> | |
#include <stdint.h> | |
#include <sys/select.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
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <errno.h> | |
#include <stdlib.h> | |
#include <arpa/inet.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
#include <stdio.h> | |
#include <string.h> |