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 / 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 / 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">
Verifying my Blockstack ID is secured with the address 1KEB82ggm1ddSEXNmjrnCM7WynJtXx4hyW https://explorer.blockstack.org/address/1KEB82ggm1ddSEXNmjrnCM7WynJtXx4hyW
@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")
@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 / 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 / crypto-info.py
Created August 8, 2017 23:33
Trying To Create Arguments
#!/usr/bin/python
import argparse, urllib, json
__author__ = 'Ben P. Dorsi-Todaro'
print "What Currency Are You Using? "
currency = raw_input(" Type list for currencies ")
#I would like to make list an argument so when the user types crypto-info.py -l or --list a list shows up
if currency == "list":
print "List of all crypto currencies symbols. "
print "btc = Bitcoin"
@LinuxPhreak
LinuxPhreak / gist:2b3f9ea10405d1671a0a
Created November 17, 2014 10:47
switches between php pages in a way I don't want
/* user.php may be user.php?foo=bar and I need the if ($actual_url == 'http://' . $website . '/user.php') to work in that case as well. */
<?php
include_once $main . 'includes/left.php';
$website = 'example.com';
$actual_url = 'http://' . $_SERVER[HTTP_HOST] . $_SERVER[REQUEST_URI];
if ($actual_url == 'http://' . $website . '/user.php')
{
include_once $main . 'includes/middle-user.php';
}
else if ($actual_url == 'http://' . $subdomain . '.' . $website . '/' || $actual_url = 'http://' . $website)
@LinuxPhreak
LinuxPhreak / modal.js
Created March 16, 2014 07:18
Modal Wont Close
$(document).ready(function() {
$('a.gv-pop').click(function() {
// Getting the variable's value from a link
var loginBox = $(this).attr('href');
//Fade in the Popup and add close button
$(loginBox).fadeIn(300);
//Set the center alignment padding + border