Skip to content

Instantly share code, notes, and snippets.

View LinuxPhreak's full-sized avatar
🎯
Focusing

Ben P. Dorsi-Todaro LinuxPhreak

🎯
Focusing
View GitHub Profile
@LinuxPhreak
LinuxPhreak / login limit
Created September 19, 2017 13:17
Working Example Of A 3 Login Limit For A Website
if (isset($_POST['submit']))
{
$datetime = date('Y-m-d H:i:s');
$username = htmlentities(trim(mysqli_real_escape_string($dbc,$_POST['username'])));
$check_user = mysqli_query($dbc,"SELECT * FROM attempts WHERE user='$username'");
$ip = $_SERVER['REMOTE_ADDR'];
if (mysqli_num_rows($check_user) > 0)
{
$date_check = mysqli_query($dbc,"SELECT * FROM attempts WHERE user='$username' AND datetime > (NOW() - INTERVAL 30 MINUTE)");
@LinuxPhreak
LinuxPhreak / bitcoin.py
Created January 1, 2018 09:03
Quick Little Python 3 Script For Coinmarket Cap
#!/bin/python3
import urllib.request, json
with urllib.request.urlopen("https://api.coinmarketcap.com/v1/ticker/bitcoin/") as url:
data = json.loads(url.read().decode())
for item in data:
name = item.get("0")
btcPrice = item.get("price_usd")
print(btcPrice)
@LinuxPhreak
LinuxPhreak / qdbrowser.py
Created January 27, 2018 16:25
My Quick And Dirty Web Browser
#!/usr/bin/python3
import sys
from PyQt4 import QtCore, QtGui, QtWebKit
from PyQt4.QtGui import *
class Browser(QtGui.QMainWindow):
def __init__(self):
QtGui.QMainWindow.__init__(self)
self.resize(800,600)
@LinuxPhreak
LinuxPhreak / btc-info.py
Last active March 14, 2018 10:29
Another simple bitcoin script in python.
#!/bin/python3
import json
import argparse
import sys
import requests
parser = argparse.ArgumentParser()
#Lets create some arguments
parser.add_argument("-s", "--symbol", help="The price of the currency")
parser.add_argument("-p", "--price", help="The price of the currency", action="store_true")
Verifying my Blockstack ID is secured with the address 1KEB82ggm1ddSEXNmjrnCM7WynJtXx4hyW https://explorer.blockstack.org/address/1KEB82ggm1ddSEXNmjrnCM7WynJtXx4hyW
@LinuxPhreak
LinuxPhreak / phishing.html
Last active October 4, 2018 09:26
Code I fetched from someone trying to phish for Facebook Account Info
<html>
<head>
<title></title>
<meta property="og:url" content="http://facebook.com" />
<meta property="og:type" content="article" />
<meta property="og:title" content="Login to facebook" />
<meta property="og:description" content="Login to facebook" />
<meta property="og:image" content="https://facebookbrand.com/wp-content/themes/fb-branding/prj-fb-branding/assets/images/fb-art.png" />
<meta name="revisit-after" content="1000 days">
<meta name="robots" content="NOINDEX">
@LinuxPhreak
LinuxPhreak / screen-recorder.py
Last active October 7, 2018 05:35
Stopping the Video Recording Issue
#!/usr/bin/env python3
import sys
import os
import subprocess
from PyQt5 import QtCore, QtGui, QtWidgets
from pynput.keyboard import Key, Controller
from ffmpeg import Ui_frmMain
class ffmpeg(Ui_frmMain):
def __init__(self, dialog):
@LinuxPhreak
LinuxPhreak / star-trek-game-credits.py
Created October 8, 2018 21:29
Beginning Of My Star Trek Fan Game
#!/usr/bin/env python3
import os
import time
#Intro here
print("\033[1;33;49m .dBBBBP dBBBBBBP dBBBBBb dBBBBBb dBBBBBBP dBBBBBb dBBBP dBP dBP");
print("\033[1;33;49m BP BB dBP dBP d8P.dBP");
print("\033[1;33;49m `BBBBb dBP dBP BB dBBBBK dBP dBBBBK dBBP dBBBBP ");
print("\033[1;33;49m dBP dBP dBP BB dBP BB dBP dBP BB dBP dBP BB ");
@LinuxPhreak
LinuxPhreak / username.py
Created November 1, 2018 14:45
Username Lookup Tool
#!/usr/bin/env python3
import requests
import os
import time
from bs4 import BeautifulSoup
#This is a testing function
def tester():
#function for testing
check_github = requests.get('https://github.com/LinuxPhreak')
@LinuxPhreak
LinuxPhreak / convertui.py
Created November 12, 2018 14:06
PyUIC5 wrapper
#!/usr/bin/env python3
from subprocess import run
import os.path
print("\033[0;33;48m Welcome to UI converter.")
ui = input("\033[0;37;48m UI File:")
output = input("Output File:")
if (os.path.exists(ui)):
run(["pyuic5","-x", ui,"-o",output])