Skip to content

Instantly share code, notes, and snippets.

View vxcute's full-sized avatar
💻
programming

astro vxcute

💻
programming
  • Alexandria, Egypt
View GitHub Profile
using System;
using PeNet.FileParser;
using PeNet;
using PeNet.Header;
namespace PEFun
{
class Program
{
static void Main(string[] args)
// client
using System;
using System.Collections.Generic;
using System.Linq;
using System.Collections;
using System.Text;
using System.Threading.Tasks;
using System.Net.Sockets;
// simple way to read a Binary File using modern c++
#include <iostream>
#include <vector>
#include <fstream>
#include <iterator>
template <typename T>
auto ReadBinFile(std::string FilePath) -> std::vector<T>
{
std::ifstream File(FilePath, std::ios::binary);
#include <stdio.h>
#include <stdnoreturn.h>
// https://godbolt.org/z/Pqv8YTPWc
int main(){
noreturn void 🤯(){printf("C Is Cool");} // noreturn means that function when called will never return and code after it won't be executed even when return statement is executed in it + nested functions are allowed
volatile const char * 🧠= "brain"; // works with clang
class Helpers {
constructor() {
this.cvt_buf = new ArrayBuffer(8);
this.cvt_f64a = new Float64Array(this.cvt_buf);
this.cvt_u64a = new BigUint64Array(this.cvt_buf);
this.cvt_u32a = new Uint32Array(this.cvt_buf);
}
ftoi(f) {
@vxcute
vxcute / wtf.c
Last active March 20, 2021 12:15
// struct person will be somewhere in memory and aligned somehow and to access
// its variables u should access with address the computer don't know what person means
struct person{
int age;
int wtf;
};
/* all of this code is translated to assembly instructions
// Simple Example to Demostrate working of cpuid by priting the cpu vendor name using inline assembly
#include <stdio.h>
int main()
{
char cpuVendor[20];
char* CPUvendor = (char*)cpuVendor;
__asm {
mov edi, CPUvendor;
@aaronst
aaronst / unc1878_indicators.txt
Created October 28, 2020 20:20
UNC1878 Indicators
# C2 FQDNs
first seen fqdn
2019-12-11 23:37:10 updatemanagir.us
2019-12-20 17:51:05 cmdupdatewin.com
2019-12-26 18:03:27 scrservallinst.info
2020-01-10 00:33:57 winsystemupdate.com
2020-01-11 23:16:41 jomamba.best
2020-01-13 05:13:43 updatewinlsass.com
2020-01-16 11:38:53 winsysteminfo.com
2020-01-20 05:58:17 livecheckpointsrs.com
@tcoppex
tcoppex / c_nostd.txt
Last active June 21, 2024 01:52
Writing C software without the standard library [Linux Edition] - Franc[e]sco's Gopherspace
###################################################################
Writing C software without the standard library
Linux Edition
###################################################################
There are many tutorials on the web that explain how to build a
simple hello world in C without the libc on AMD64, but most of them
stop there.
I will provide a more complete explanation that will allow you to
build yourself a little framework to write more complex programs.
@ohnx
ohnx / Makefile
Created February 5, 2020 06:20 — forked from ilammy/Makefile
Linux kernel system call table hooking
obj-m += afw.o
afw-objs := afw_main.o locate_sct.o ttgl.o
ccflags-y := -std=gnu99 -O2
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean