Skip to content

Instantly share code, notes, and snippets.

View 0xsonu's full-sized avatar
🏠
Working from home

Sonu Kumar 0xsonu

🏠
Working from home
View GitHub Profile
@0xsonu
0xsonu / Github Login
Last active November 15, 2021 14:13
After August 21, we have to login into github by following these steps
Create Personal Access Token on GitHub
From your GitHub account, go to Settings => Developer Settings => Personal Access Token => Generate New Token (Give your password) => Fillup the form => click Generate token => Copy the generated Token, it will be something like ghp_sFhFsSHhTzMDreGRLjmks4Tzuzgthdvfsrta
For Windows OS
Go to Credential Manager from Control Panel => Windows Credentials => find git:https://github.com => Edit => On Password replace with with your GitHub Personal Access Token => You are Done
If you don’t find git:https://github.com => Click on Add a generic credential => Internet address will be git:https://github.com and you need to type in your username and password will be your GitHub Personal Access Token => Click Ok and you are done
For a Linux-based OS ⤴
1. https://angrytools.com/ -- Tool for generating Gradient background and much more in web development.
2. https://animista.net/ -- Create animation code for web development.
@0xsonu
0xsonu / notes.ts
Last active March 1, 2022 06:00
Basic intro to TypeScript
// Basic Types
let id: number = 5
let company: string = 'SK Dominator'
let isPublished: boolean = true
let x: any = 'Hello'
let ids: number[] = [1, 2, 3, 4, 5]
let arr: any[] = [1, true, 'Hello']
// Tuple
@0xsonu
0xsonu / index.md
Last active March 1, 2022 13:15
NodeJS Hacks

manage heap size of node procsess

to see current allocated size for node env. run this command in terminal node -e 'console.log(v8.getHeapStatistics().heap_size_limit/(1024*1024))'

to set/increase heap size run this command in terminal

Windows

@0xsonu
0xsonu / CleanFootprint.md
Last active December 16, 2022 07:02
Hackers and Security Analysts Collections: Tips and Free Tools List for Penetration Testers,

Cleanup Evidence on Windows

  • Use Metasploit, and issue the command -> meterpreter > clearev this command will clear the application, system, and Security logs.

  • Or you can go to the Event Viewer > and clear the log manually.

image

@0xsonu
0xsonu / Missing Bootloader in Boot Manager.md
Last active June 8, 2023 18:05
UEFI: How to repair Kali-linux grub dual boot with windows

UEFI: How to repair kali-linux grub dual boot with Windows 10

If you have dual booted kali with Windows 10 then most probably you are running PC with UEFI firmware. The booting process of UEFI is completely different from that of BIOS. Right after installation or after updating your UEFI, do you find that kali is missing from boot menu options? You can see the entry of Windows boot manager but there is no entry of kali in boot menu.

The reason can be failed grub installation or Windows major updates. If you update UEFI it deletes the entry of kali from NVRAM.

If you update UEFI from 1.x to 2.x then entry of Grub is removed from the boot-menu. Follow this post if you did this If you update UEFI from 1.x to 1.y then it remains there.

@0xsonu
0xsonu / grub_installation_errror.md
Created June 8, 2023 18:02
Kali Installation Error - executing grub install dummy failed

Sometimes when you reinstall Kali, the installer shows this error executing grub install dummy failed while installing grub and you have to skip this most important step to continue. The above commands are required if grub was not installed during the installation.

However if grub is present in EFI system partition but entry of kali is missing from boot menu options then you don't have to go through those commands. In hp PCs boot menu options, select

Boot from EFI just below the Windows Boot Manager.

Go to System>EFI>kali>grubx64.efi

@0xsonu
0xsonu / totp.py
Created August 18, 2023 10:39
Generate TOTP and Authentication Token
import pyotp
import hashlib
import hmac
import time
import base64
# Your email address
email = "sonu.patna0808@gmail.com"
# The shared secret is email + "HENNGECHALLENGE003"
shared_secret = (email + "HENNGECHALLENGE003").encode("utf-8")