Skip to content

Instantly share code, notes, and snippets.

View rudSarkar's full-sized avatar
:electron:
Negatively Charged

Rudra Sarkar rudSarkar

:electron:
Negatively Charged
View GitHub Profile
View main.go
package main
import "fmt"
func main() {
var name string
var age int
var is_active bool // true false
View KruskalSecondBestMST.java
import java.util.*;
class Edge implements Comparable<Edge> {
int source, destination, weight;
public int compareTo(Edge edge) {
return this.weight - edge.weight;
}
}
View PrimMST.java
import java.util.*;
class Graph {
private int V; // Number of vertices
private List<List<Edge>> adjacencyList;
Graph(int V) {
this.V = V;
adjacencyList = new ArrayList<>(V);
for (int i = 0; i < V; ++i)
@rudSarkar
rudSarkar / convert-heic-to-png.sh
Created May 30, 2023 07:25
Convert HEIC format to PNG using onliner
View convert-heic-to-png.sh
find . -name "*.HEIC" -exec sh -c 'sips -s format png "$1" --out "$(basename "$1" .HEIC).png"' _ {} \;
@rudSarkar
rudSarkar / main.go
Created May 27, 2023 14:51
snoopy.htb LFI
View main.go
package main
import (
"archive/zip"
"fmt"
"io"
"net/http"
"net/url"
"os"
)
@rudSarkar
rudSarkar / main.go
Created February 26, 2023 21:26
Read bagel.htb:5000 phil user id_rsa
View main.go
package main
import (
"fmt"
"log"
"github.com/gorilla/websocket"
)
func main() {
@rudSarkar
rudSarkar / chrome-scree-share-fix-mac.md
Created July 3, 2022 19:26
mac Google Chrome can't share screen Fix
View chrome-scree-share-fix-mac.md

use bellow command to revoke the screen capture permission

tccutil reset ScreenCapture com.google.Chrome

Then navigate to System Preferences > Security & Privacy > Screen recording

Click on the + button to add chrome once again /Applications/Google Chrome.app

@rudSarkar
rudSarkar / bucket-disclose.sh
Created June 17, 2022 02:36 — forked from fransr/bucket-disclose.sh
Using error messages to decloak an S3 bucket. Uses soap, unicode, post, multipart, streaming and index listing as ways of figure it out. You do need a valid aws-key (never the secret) to properly get the error messages
View bucket-disclose.sh
#!/bin/bash
# Written by Frans Rosén (twitter.com/fransrosen)
_debug="$2" #turn on debug
_timeout="20"
#you need a valid key, since the errors happens after it validates that the key exist. we do not need the secret key, only access key
_aws_key="AKIA..."
H_ACCEPT="accept-language: en-US,en;q=0.9,sv;q=0.8,zh-TW;q=0.7,zh;q=0.6,fi;q=0.5,it;q=0.4,de;q=0.3"
H_AGENT="user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36"
@rudSarkar
rudSarkar / OBWS_2.md
Created May 26, 2022 11:51 — 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/">