Skip to content

Instantly share code, notes, and snippets.

View 0rbianta's full-sized avatar

0rbianta 0rbianta

View GitHub Profile
original:
a2 91 02 94 a0 00 00
mod:
4c 01 00 94 a0 00 00
@0rbianta
0rbianta / calc_fibonacci.coffee
Created January 13, 2022 21:22
calc_fibonacci with CoffeeScript
calc_fibonacci = (count) ->
ptr = 1
last = 1
for _ in [1..count]
newv = ptr + last
last = ptr
ptr = newv
ptr
console.log calc_fibonacci 2
@0rbianta
0rbianta / getstr.c
Last active December 4, 2021 07:08
Overflow-safe string input for C
#include <stdio.h>
#include <string.h>
void stdinputs(char *strbuff, int len)
{
char *usr;
scanf("%ms", &usr);
strncpy(strbuff, usr, len);
}
@0rbianta
0rbianta / main.rb
Created March 28, 2021 15:25
Binary converter free 2.0 with Ruby
def num2bin(num)
build_reverse = ""
eax = num
while eax != 0
build_reverse += (eax%2).to_s
eax = eax/2.to_i
@0rbianta
0rbianta / hello_world.asm
Created March 17, 2021 08:57
x86 Hello world
global _start
section .text
hw db "Hello, World!",0xA
_start:
mov rax, 0x1
mov rdi, 0x1
mov rsi, hw
mov rdx, 14
syscall
@0rbianta
0rbianta / labels
Last active March 15, 2021 19:08
Yolo default trained labels
person
bicycle
car
motorbike
aeroplane
bus
train
truck
boat
traffic light
@0rbianta
0rbianta / linux_x86_sh_root_shellcode.c
Created January 31, 2021 11:08
Linux x86 root shellcode when execute /bin/sh
char *shellcode=
"\xeb\x1f"
"\x31\xc0"
"\xb0\xb6"
"\x5b"
"\x31\xc9"
"\x31\xd2"
"\xcd\x80"
"\x31\xc0"
"\xb0\x0f"
@0rbianta
0rbianta / find_the_most_repetitive_letter_nodejs.js
Last active January 19, 2021 07:50
Find the most repetitive letter
const value1 = "Hello World!";
var data = [];
for(var i in value1){
if(value1[i]!=" ") data.push(value1[i]);
}
var build = [];
const data = "Hello World!!! This is a simple JS code to count word number.";
word_count = 0;
for(let i = 0;i<data.length;i++){
if(data[i]==" "){
word_count++;
}
}
@0rbianta
0rbianta / string2hex.js
Last active January 14, 2021 07:03
String2Hex NodeJS
const data = "Hello World";
var hexs = [];
for(var i=0;i<data.length;i++){
hexs.push(data.charCodeAt(i).toString(16));
}
console.log(hexs);