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 <winsock2.h> | |
#include <Windows.h> | |
#include <stdio.h> | |
int main() | |
{ | |
WSADATA wsadata; | |
WSAStartup(MAKEWORD(2, 2), &wsadata); | |
SOCKET s = socket(AF_INET, SOCK_STREAM, 0); | |
struct sockaddr_in addr; |
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
org 0x7c00 | |
video = 0x10 | |
set_cursor_pos = 0x02 | |
write_char = 0x0a | |
system_services = 0x15 | |
wait_service = 0x86 | |
keyboard_int = 0x16 |
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 <Windows.h> | |
#include <stdio.h> | |
int main() { | |
HANDLE handle = CreateFileMappingW(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 256, L"ChatSyncFileMap"); | |
LPVOID address = MapViewOfFile(handle, FILE_MAP_ALL_ACCESS, 0, 0, 0); | |
HANDLE event = CreateEventW(NULL, FALSE, FALSE, L"ChatSyncEvent"); | |
for (;;) { |
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 <stdio.h> | |
#include <arpa/inet.h> | |
#include <poll.h> | |
#include <unistd.h> | |
int main() { | |
int sockfd = socket(AF_INET, SOCK_STREAM, 0); | |
struct sockaddr_in address = { |
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 <Windows.h> | |
LRESULT WinProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { | |
switch (uMsg) { | |
case WM_PAINT: | |
HDC hDc = GetDC(hWnd); | |
RECT rect = { | |
75, | |
75, | |
250, |
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 <X11/Xlib.h> | |
int main() { | |
XEvent event; | |
Display* display = XOpenDisplay(NULL); | |
Window w = XCreateSimpleWindow(display, DefaultRootWindow(display), 50, 50, 250, 250, 1, BlackPixel(display, 0), WhitePixel(display, 0)); | |
XMapWindow(display, w); | |
XSelectInput(display, w, ExposureMask); | |
for (;;) { |
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/types.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> | |
#include <openssl/ssl.h> | |
#include <stdio.h> | |
#include <string.h> | |
void main() { | |
int sockfd = socket(AF_INET, SOCK_STREAM, 0); |
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 <stdbool.h> | |
void print_hex(unsigned char* buffer, int num) { | |
for (int i = 0; i < num; i++) { | |
if (i % 10 == 0) { | |
printf("\n"); | |
} | |
printf("%.2X ", buffer[i]); |
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 <curses.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
void main() { | |
WINDOW* win = initscr(); | |
keypad(win, true); | |
nodelay(win, true); | |
int posX = 0; | |
int posY = 0; |
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 <openssl/ssl.h> | |
#include <string.h> | |
#include <stdio.h> | |
void main() { | |
int sockfd = socket(AF_INET, SOCK_STREAM, 0); | |
struct sockaddr_in addr = { |
NewerOlder