Skip to content

Instantly share code, notes, and snippets.

View dantsec's full-sized avatar
🐧
Talk is cheap, show me the code!

0xDant dantsec

🐧
Talk is cheap, show me the code!
View GitHub Profile
@dantsec
dantsec / morse_encode.c
Created April 27, 2024 21:43
This algorithm encodes text to morse code.
/*
gcc morse_encode.c -o morse && ./morse
*/
#include <stdio.h>
#define ALPHABET_TOTAL_LETTERS (26)
#define ALPHABET_LINE_SIZE (10)
const char ALPHABET[ALPHABET_TOTAL_LETTERS][ALPHABET_LINE_SIZE] = {
@dantsec
dantsec / root.c
Created May 22, 2023 01:40
Find any root with this algorithm!
#include <stdio.h>
#include <stdlib.h>
#define ROOT 1.21
#define POTENCY 2
#define PHASES 60
#define PRECISION 15
double* find_root(double *, double, int, int);
double potency_by(double, int);
@dantsec
dantsec / auto_clicker.py
Created May 16, 2023 20:45
Auto clicker made in Python!
"""
Installing Packages:
pip install threading argparse pynput
Run example:
python auto_clicker.py -d 1.0 -b right -s . -f ,
"""
import threading
import argparse
@dantsec
dantsec / trash.plugin.zsh
Created May 3, 2023 22:28
ZSH Trash Cleaner Plugin
#!/usr/bin/env zsh
# to deactivate double rm verification in zsh:
# echo "setopt rm_star_silent" >> ~/.zshrc
#
# to install:
# cd ~/.oh-my-zsh/custom/plugins
# mkdir trash && cd trash && (clone this raw)
# source trash.plugin.zsh
#
@dantsec
dantsec / cronometer.py
Created May 3, 2023 00:48
Simple Cronometer made in Python
from time import sleep
hours = minutes = seconds = 0
try:
while(True):
if(seconds == 60):
seconds = 0
minutes += 1
@dantsec
dantsec / shell.c
Created March 30, 2023 18:41
A simple interactive shell made in C
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/wait.h>
#define MAX_LINE 100
int main(void) {
char *args[MAX_LINE];
@dantsec
dantsec / base_converter.py
Last active February 12, 2023 18:53
A simple script who convert binary, octal, decimal and hexadecimal bases
"""
[!] testes.py: excluded 02 / 03 / 2022
- content: # NULL
"""
class DECIMAL():
def __init__(self, num) -> None:
self.num: int = num
self.dictionary = {
@dantsec
dantsec / hello.asm
Last active February 4, 2023 19:22
"Hello, World!" in Assembly x86
; Hello, World! in Assembly x86
; All SYSCALLS (x86) are located at unistd_32.h at /usr/include/asm/unistd_32.h
; Amazing Guide: https://syscall.sh/
;
;
; Author: 0xDantas
; Date: 23-Jan-2023
;
; To Compile:
; nasm -f elf32 hello.asm -o hello.o