Skip to content

Instantly share code, notes, and snippets.

Avatar
:electron:
Negatively Charged

Rudra Sarkar rudSarkar

:electron:
Negatively Charged
View GitHub Profile
@rudSarkar
rudSarkar / OBWS_2.md
Created May 26, 2022 — forked from seresistvanandras/OBWS_2.md
Hacking smart contracts for fun and profit
View OBWS_2.md

Hacking smart contracts for fun and profit

Description of the game

The goal of the game to break as many contracts as possible! Note: one of these contracts is a HONEYPOT! BE CAREFUL!!

Claim your Ropsten test ether here!

The contracts you need to break and their addresses:

View Secure .git directory!
# -------------------------------------------------
# Protect your .git directory!
# (You don't want anyone to download a copy of your website)
# -------------------------------------------------
# Add to .htaccess
# For Apache 2.4
<DirectoryMatch "^/.*/\.git/">
@rudSarkar
rudSarkar / rename-image-to-number-list.sh
Created Apr 10, 2022
Rename all files to number list like 1.jpg 2.jpg 3.jpg
View rename-image-to-number-list.sh
ls | cat -n | while read n f; do mv "$f" "$n.jpg"; done
@rudSarkar
rudSarkar / get_local_time.py
Created Apr 9, 2022
get local time using pytz and datetime
View get_local_time.py
import pytz
from datetime import datetime
BST = pytz.timezone('Asia/Dhaka')
datetime_bst = datetime.now(BST)
get_local_time = datetime_bst.strftime('%I:%M%P')
# Get more strftime : https://strftime.org/
print(get_local_time)
@rudSarkar
rudSarkar / cloud_metadata.txt
Created Feb 12, 2022 — forked from jhaddix/cloud_metadata.txt
Cloud Metadata Dictionary useful for SSRF Testing
View cloud_metadata.txt
## AWS
# from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories
http://169.254.169.254/latest/user-data
http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME]
http://169.254.169.254/latest/meta-data/iam/security-credentials/[ROLE NAME]
http://169.254.169.254/latest/meta-data/ami-id
http://169.254.169.254/latest/meta-data/reservation-id
http://169.254.169.254/latest/meta-data/hostname
http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key
@rudSarkar
rudSarkar / fifo.sh
Created Jan 2, 2022
FIFO Page Replacement Algorithm
View fifo.sh
echo "Enter the number of Pages: \t"
read PAGES
echo "Enter reference string values: \n"
for ((m = 0; m < PAGES; m++)); do
echo "Page $m \t"
read ref[$m]
done
echo "What are the total number of frames: \t"
@rudSarkar
rudSarkar / port-scan.sh
Created Dec 8, 2021 — forked from priyanshus/port-scan.sh
NMAP scan for a list of subdomains
View port-scan.sh
#!/bin/bash
#Performs port scan using nmap
print_usage() {
cat << _EOF_
Utility to scan open ports. Can be used to scan ports for a domain or a list of domains specified in a file.
Example Usage:
-h, --help Show brief help
-d, --domain Domain name or ip to scan
-f, --file Spefify a file containing domains/IPs to scan
View gist:e85af346cbbacd1cc20d752b765472fb
@rudSarkar
rudSarkar / nuclei-rce.yaml
Created Sep 20, 2021 — forked from c3l3si4n/nuclei-rce.yaml
POC demonstrating RCE on Nuclei v2.5.0. The following PoC will execute `touch /tmp/rce_on_nuclei`. JS exploit based on CVE-2021-21224 PoCs
View nuclei-rce.yaml
id: nuclei-rce
info:
name: Nuclei Template RCE by Chromium
author: c3l3si4n
severity: critical
tags: rce,hackback
headless:
- steps:
View keybase.md

Keybase proof

I hereby claim:

  • I am rudSarkar on github.
  • I am rudra0x01 (https://keybase.io/rudra0x01) on keybase.
  • I have a public key whose fingerprint is 533D 9358 16B0 33F9 9898 4623 2115 2ABB 14E0 62BD

To claim this, I am signing this object: