Skip to content

Instantly share code, notes, and snippets.

View sayantanHack's full-sized avatar

Sayantan sayantanHack

View GitHub Profile
import socket
import threading
import sys
# ================= This is Server ===============
class Server:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
connections = []
def __init__(self):
self.sock.bind(('0.0.0.0',10000))
@sayantanHack
sayantanHack / App.js
Last active May 26, 2024 16:17
Best Button animation and React button to change random color
import { useState } from 'react'
//import Card from "./Card.jsx"
//import reactLogo from './assets/react.svg'
//import viteLogo from '/vite.svg'
import './App.css'
function App() {
const [count, setCount] = useState(6677)
// The below function create and return random hex
const setBg = () => {
@sayantanHack
sayantanHack / fileGenerator.sh
Created May 17, 2021 03:12
This is a Folder and file generator .The folder & file name will be taken from a txt file.
file="ip.txt"
i=1
#reading from file each lines
while read line; do
#ft=".docx"
nm=${line//./_}
mkdir $nm;
#!/bin/bash
file="ip.txt"
i=1
while read line ; do
echo "[+] Scan Started $line ... ";
nmap -sS -p- -v -A -T3 -sC -sU -O -oN /home/kali/Desktop/nmap_output/$line $line -oA $line
echo "Scan Finished $line"
i=$((i+1));
@sayantanHack
sayantanHack / buffer_overflow.c
Created October 28, 2021 07:36
This is a simple code for Buffer Overflow in C. Allocates the memory for specific range if exceed then shell command can be executed .
#include<stdio.h>
#include<stdlib.h>
int main()
{
//variables assigned
char *place;
char *systemcmd;
place=(char *)malloc(10);
@sayantanHack
sayantanHack / ipfinder.sh
Last active December 2, 2023 10:20
This will get all IPs available in the same Subnet. You have to provide upto 3rd octate
#!/bin/bash
if [ "$1" == "" ]
then
echo "Usage: ./ipfinder.sh [network IP]"
echo "Example: ./ipfinder.sh 192.168.0"
else
for ip in `seq 1 254`; do
ping -c 1 $1.$ip | grep "64 byte" | cut -d " " -f 4 | sed 's/.$//' &
done