Skip to content

Instantly share code, notes, and snippets.

View sayantanHack's full-sized avatar

Sayantan sayantanHack

View GitHub Profile
@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
@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);
#!/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 / 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;
@sayantanHack
sayantanHack / index.html
Created October 10, 2019 17:47
Best Button animation
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Best Hover Button</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
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))
// LIST RANKING
void main(){
var superHeroes = ['Hulk','Batman',"spiderman","flash"];
superHeroes.forEach((hero){
print("Position : ${superHeroes.indexOf(hero)+1} Next super Hero is $hero ");
});
}
import email.utils as eu
num = int(raw_input(""))
lst=[]
for i in range(num):
f = raw_input("")
li = eu.parseaddr(f)
unm = li[1].split("@")[0]
dom = li[1].split("@")[1].split(".")[0]
ext = li[1].split("@")[1].split(".")[1]
n=4
m=1
for i in range(n):
for j in range(n):
print("*", end='')
print('*')
n=n-1
print('*')
/******************************************************************************
Online C Compiler.
Code, Compile, Run and Debug C program online.
Write your code in this editor and press "Run" button to compile and execute it.
***************************SWAP WITHOUT THIRD VARIABLE********************************/
#include <stdio.h>