Skip to content

Instantly share code, notes, and snippets.

View tyrells's full-sized avatar

Tyrell Sassen tyrells

View GitHub Profile
@tyrells
tyrells / pwgen-bios-with-i.py
Created April 29, 2021 15:28 — forked from Rdp3389/pwgen-bios-with-i.py
generate result for HP serial with "i" error code
print("============================ Insyde H2O BIOS 'i'/'I' error-code ============================")
print("= Insyde H2O BIOS (Acer, HP) System Disabled 'i'/'I' error-code response generator.")
print("= this script meant to solve https://github.com/bacher09/pwgen-for-bios/issues/52 in Python 3")
print("= ")
print("= HP official response to BIOS Password reset: https://support.hp.com/us-en/document/c06368824")
print("============ Start Quote ============")
print("= A forgotten BIOS password cannot be reset by HP. HP is committed to the security and privacy of")
print("= our customers. To resolve a forgotten BIOS password issue, a system board replacement is required,")
print("= and additional customer costs apply. For more information, go to HP Worldwide Limited Warranty and Technical Support.")
print("= https://www8.hp.com/us/en/privacy/limited_warranty.html")
#!/usr/bin/env python
import sys
import os.path
from cryptography import x509
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import serialization
import hashlib
import random
from datetime import timedelta
from cryptography.hazmat.primitives.asymmetric import rsa, dsa, ec, ed25519, ed448
@tyrells
tyrells / gist:9c960b0343853fc813b694d579b0d4f0
Created January 3, 2020 01:01
MS-DOS Aspect ratio correction and image resize using imagemagick
# To convert 320x200 screenshots from DOS games into 640x480 images using a single imagemagick command
# Based on the technique in https://www.gamasutra.com/blogs/FelipePepe/20150423/241730/No_MSDOS_games_werent_widescreen_Tips_on_correcting_aspect_ratio.php
magick convert original.png -interpolate Nearest -filter Point -resize 640x1200! +filter -interpolate Bilinear -resize 640x480! -verbose output.png
@tyrells
tyrells / UserEnum_LDAP.sh
Last active May 23, 2018 22:50
LDAP User Enumaration using ldapsearch
#!/bin/bash
# Usage: ./UserEnum_LDAP.sh usernames.txt
# References:
# https://github.com/sensepost/UserEnum
# https://github.com/sensepost/UserEnum/blob/master/UserEnum_LDAP.py
# http://ldapwiki.com/wiki/LDAP%20ping
#
# Output: valid user will begin with E, otherwise will begin with F
@tyrells
tyrells / extract_audio.sh
Created May 6, 2014 17:08
How to extract audio from a .mp4 file
# 1. Find audio track number
MP4Box -info file.mp4
# 2. Extract raw audio track
MP4Box -raw 2 file.mp4
# 3. Package raw audio track into m4a container
MP4Box -add file_track2.aac#audio file.m4a
@tyrells
tyrells / disable-service.yml
Last active October 19, 2023 20:53
Ansible task to stop service even if it doesn't exist
# This task will stop and disable a service without failing if the service does not exist.
# Requires Ansible 1.4 or newer.
# Update Dec 2016: Have rewritten this for the latest version of ansible and put conditions for both Ubuntu and CentOS
- name: "disable unused services"
service: name={{item}} state=stopped enabled=no
register: command_result
failed_when: "unused_disable|failed and ('find' not in unused_disable.msg and 'found' not in unused_disable.msg)"
with_items: