Skip to content

Instantly share code, notes, and snippets.

View h3xxx's full-sized avatar
:octocat:
hello :trollface: 💻 :hurtrealbad:

Roger Bonin h3xxx

:octocat:
hello :trollface: 💻 :hurtrealbad:
View GitHub Profile
@h3xxx
h3xxx / pdf-to-txt.sh
Created December 26, 2023 14:57 — forked from drmohundro/pdf-to-txt.sh
GhostScript PDF to text stdout
# requires ghostscript to be installed first - on mac, install with `brew install ghostscript`
# -sDEVICE=txtwrite - text writer
# -sOutputFile=- - use stdout instead of a file
# -q - quiet - prevent writing normal messages to output
# -dNOPAUSE - disable prompt and pause at end of each page
# -dBATCH - indicates batch operation so exits at end of processing
gs -sDEVICE=txtwrite -sOutputFile=- -q -dNOPAUSE -dBATCH to-be-processed.pdf
@h3xxx
h3xxx / python3_https_server.py
Created December 8, 2022 12:16 — forked from stephenbradshaw/python3_https_server.py
Python 3 Simple HTTPS server
#!/usr/bin/env python3
# python3 update of https://gist.github.com/dergachev/7028596
# Create a basic certificate using openssl:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# Or to set CN, SAN and/or create a cert signed by your own root CA: https://thegreycorner.com/pentesting_stuff/writeups/selfsignedcert.html
import http.server
import ssl
httpd = http.server.HTTPServer(('127.0.0.1', 443), http.server.SimpleHTTPRequestHandler)
@h3xxx
h3xxx / Readme.md
Created July 24, 2020 12:15 — forked from stecman/Readme.md
Steam auto trader

Maximum Hax

Automates the UI actions (clicks, typing) to sell Steam trading cards from the Steam web interface. To use this:

  1. Log into your Steam account in Chrome
  2. Go to [Username] -> Inventory
  3. Open the Javascript console (View -> Developer -> Javascript Console)
  4. Paste in the entire script below and press enter
  5. To start selling all trading cards in your inventory, type doHax() in the console and press enter
  6. ...
const poll = async ({ fn, validate, interval, maxAttempts }) => {
let attempts = 0;
const executePoll = async (resolve, reject) => {
const result = await fn();
attempts++;
if (validate(result)) {
return resolve(result);
} else if (maxAttempts && attempts === maxAttempts) {
@h3xxx
h3xxx / tizenrecover.java
Created June 25, 2019 11:23 — forked from rgngl/tizenrecover.java
Recovery utility for Tizen certificate passwords
// Small utility to recover forgotten Tizen certificate password.
// If you still have the Eclipse IDE remembering the password, you
// can find it in encrypted form in a file:
// <WORKSPACE>/.metadata/.plugins/org.tizen.common.sign/profiles.xml
// Then simply paste the password from that file to this utility as
// a command line parameter.
// Code is mostly copied from Tizen IDE source code.
package fi.ustun.tizendecipher;
@h3xxx
h3xxx / imgur.sh
Created May 20, 2016 22:22 — forked from 0xAether/imgur.sh
A script that scrapes the image hosting website imgur.com
#!/usr/bin/env bash
while [ 1 == 1 ]
do
##########################################################################
url=$(cat /dev/urandom | tr -cd "[:alnum:]" | head -c 5)
curl -f -s http://imgur.com/$url > /dev/null
exitstatus=$?
@h3xxx
h3xxx / 4chan.sh
Created May 20, 2016 22:21 — forked from 0xAether/4chan.sh
A bash function to download all the images in a 4chan thread
function 4chan() {
if [ $# -ne 1 ]
then
echo 'No URL specified! Give the URL to thread as the ONLY argument'
return 1
fi
url=$1
@h3xxx
h3xxx / app.js
Last active August 29, 2015 14:11 — forked from jeff-hager-dev/app.js
var express = require('express');
var fs = require('fs');
var path = require('path');
var port = 3005;
var staticDir = "staticFiles"
var app = express();
app.use(function (req, res, next) {
//NOTE (JNHager): NEVER DO THIS IN A PRODUCTION SYSTEM. STRICTLY FOR TESTING LOCALLY!!!!