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
@rudSarkar
rudSarkar / git_branch_delete.sh
Created June 17, 2024 17:43
delete branch except main
git branch | grep -v 'main' | xargs git branch -d
#!/bin/bash
# Specify the directory containing CR2 files
input_dir="."
# Check if the directory exists
if [ ! -d "$input_dir" ]; then
echo "Directory '$input_dir' does not exist."
exit 1
fi
package main
import "fmt"
func main() {
var name string
var age int
var is_active bool // true false
import java.util.*;
class Edge implements Comparable<Edge> {
int source, destination, weight;
public int compareTo(Edge edge) {
return this.weight - edge.weight;
}
}
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
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
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
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

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
#!/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"