Skip to content

Instantly share code, notes, and snippets.

View SilverTD's full-sized avatar

Thanh Duy SilverTD

  • Dong Thap, Vietnam
  • 16:47 (UTC +07:00)
View GitHub Profile
@SilverTD
SilverTD / Vector3.cpp
Created February 4, 2023 13:33
Vector3 in Rust and C++
#pragma once
#include <math.h>
class Vector3f {
public:
float x = 0.0f,
y = 0.0f,
z = 0.0f;
@SilverTD
SilverTD / Cube.cpp
Last active January 21, 2023 13:36
Smooth diffuse lighting for a cube with Opengl Glut.
#include <GL/glut.h>
#include <math.h>
#include <iostream>
const float ambient_color[] = {0.0, 0.0, 0.0, 0.0};
const float light_diffuse_0[] = {0.0, 0.5, 0.5, 1.0};
const float light_position_0[] = {0.0, 0.0, 5.0, 1.0};
unsigned angle = 0;
unsigned coordinate_list;
@SilverTD
SilverTD / REVERSE_BITS.cpp
Last active September 29, 2022 13:29
Reverse bits written in c++
#pragma GCC target("avx2")
#pragma GCC optimize("Ofast")
#include <iostream>
#include <bitset>
#include <utility>
#include <ciso646>
template<typename T> constexpr std::size_t get_max_bits() { return sizeof(T) * 8; }
template<typename T, std::size_t MAX_BITS = get_max_bits<T>()>
@SilverTD
SilverTD / leak.go
Created August 24, 2022 13:11
Leak database written in golang
package main
import (
"os"
"fmt"
"time"
"net/http"
"io/ioutil"
"encoding/json"
)
section .data
str: DB "We are Vietnamese"
strlen: DB 0x0
str_length equ $-str
section .text
global _start
_start:
mov [strlen], DWORD str_length
@SilverTD
SilverTD / NameToAvatar.js
Last active December 1, 2021 12:21
A script to convert name to avatar.
function NameToAvatar(name, backgroundColor, fontColor)
{
this.name = name.split(' ');
this.backgroundColor = backgroundColor || this.generatorColor();
this.fontColor = fontColor || "white";
this.init();
}
NameToAvatar.prototype.init = function()
{
@SilverTD
SilverTD / Bot.md
Created October 22, 2021 08:04
The first bot that I made in python (selenium), this bot will automatically infiltrate each user account in the website 789.vn.

BotHack789.vn

How the bot works

  • The bot will first go to the url dashboard.789.vn.
  • Then will log in to the account that I have prepared.
  • Next, after logging in, the bot will go to the url dashboard.789.vn/account and then change the localStorage (change the id to a certain number).
  • Then refresh the page, you will see the user of that id.
  • The bot will automatically change the name, phone number and address to hacked (You can change the password, but the probability is very low).
  • I found this bug myself during an internet walk.
@SilverTD
SilverTD / Dec2Bin.asm
Last active May 15, 2025 13:30
An assembly program to convert decimal to binary (intel syntax).
; nasm -f elf32 dec2bin.asm
; gcc -m32 -o dec2bin dec2bin.asm
extern printf
extern scanf
global main
section .data
number times 4 dd 0x0
length times 4 dd 0x0
@SilverTD
SilverTD / Raidforums.js
Last active November 5, 2021 04:58
Redesigned raidforums.com page as nice as discord, using javascript. To use just download the tampermonkey and load the code.
// ==UserScript==
// @name Raid Forums
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Redesigned raidforums.com page as nice as discord, using javascript
// @author SilverbossTD
// @match https://raidforums.com/
// @icon https://www.google.com/s2/favicons?domain=raidforums.com
// @grant none
// ==/UserScript==