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
| ; Compile with nasm -f elf64 test.asm | |
| BITS 64 | |
| SECTION .text | |
| global _start | |
| _start: | |
| sub rsp, 8 ; Align the stack pointer for a function call | |
| mov rax, 0x14 ; Move syscall number 14 to rax (sys_getpid) | |
| int 0x80 ; Call system call | |
| push rax ; push rax to the stack | |
| mov rbx, rax ; move rax to rbx |
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
| #define _BSD_SOURCE 2387423 | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #include <stdint.h> | |
| #include <math.h> | |
| #include <stddef.h> | |
| #include <GLFW/glfw3.h> |
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
| unsigned long int LinuxWrite(unsigned fd, const char *str, unsigned long len) | |
| { | |
| unsigned long ret = -1; | |
| __asm__ __volatile__("int $0x80" : "=a" (ret) : "a" (4), "b" (fd), "c" (str), "d" (len)); | |
| return ret; | |
| } | |
| void LinuxExit(int code) | |
| { | |
| __asm__ __volatile__ ("int $0x80" :: "a" (1), "b" (code)); |
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
| CC=clang | |
| CFLAGS=-Wall | |
| LDFLAGS=-lfl | |
| all: | |
| bison -d calculator.y | |
| flex calculator.l | |
| $(CC) $(CFLAGS) -c scanner.c -o scanner.o |
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
| from twisted.internet.protocol import Protocol, Factory | |
| from twisted.internet import reactor, protocol | |
| from twisted.protocols.basic import LineReceiver | |
| from twisted.python import log | |
| import sys, time | |
| class Channel(): | |
| def __init__(self, name, ctime, modes): | |
| self.name = name |
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
| /* This file is public domain although credit would be nice :) */ | |
| #include <unistd.h> | |
| #include <cstdio> | |
| #include <iostream> | |
| #include <cstdlib> | |
| #include <string> | |
| #include <dlfcn.h> | |
| #include <cassert> |
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
| void HandleEvents(HWND hwnd, UINT message, WPARAM wParam, LPARAM lparam) | |
| { | |
| switch (LOWORD(wParam)) | |
| { | |
| case 1: // "Scan" button | |
| { | |
| //MessageBox(NULL, L"Scan button", L"You clicked scan", MB_OK); | |
| // Disable the window, get the text from it, then start the scan threads. | |
| HWND txtbox = GetDlgItem(hwnd, 8); | |
| Edit_Enable(txtbox, FALSE); |
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
| #include <cstdio> | |
| #include <iostream> | |
| #include <string> | |
| #include <cstring> | |
| #include <unistd.h> | |
| #include <cstdlib> | |
| #include <vector> | |
| #include <chrono> | |
| bool AquaConstTimeCMP(const std::string &str1, const std::string &str2) |
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
| // Pointers returns by SizeReduce should be free()'d | |
| char *SizeReduce(size_t size) | |
| { | |
| static const char *sizes[] = { | |
| "B", | |
| "KB", | |
| "MB", | |
| "GB", | |
| "TB", | |
| "PB", |
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
| # bigdecoder.py, by aderyn@gmail.com, 2009-03-01 | |
| # | |
| # decoder for .BIG-format files utilized by Red Alert 3 and C&C: Zero Hours | |
| # among others. .big is a trivial archival format. quite frankly, this is | |
| # probably the simplest compound file format imaginable. | |
| # | |
| # this script is written for microsoft windows. it can probably be easily | |
| # adapted for other platforms, but i haven't tried. | |
| # | |
| # file structure: |