Skip to content

Instantly share code, notes, and snippets.

View digininja's full-sized avatar
💭
Hacking away

Robin Wood digininja

💭
Hacking away
View GitHub Profile
@digininja
digininja / gist:0392409a5b7e3a3e0bb4fe3905cc6db5
Created August 11, 2023 10:47
SSH Brute Force Passwords by Day
These are the top 10 passwords tried against an SSH honeypot I'm running. I'm taking a sample every day and running the data through Pipal to generate the lists. I'm planning to automate this and add all the other Pipal data as soon as I get time.
These stats aren't that interesting at the moment, but I'm hoping to look for trends or to try to spot odd things happening, such as new default creds being picked up and tested. Any suggestions, let me know.
7 August
123456 = 38 (11.11%)
root = 8 (2.34%)
12345678 = 8 (2.34%)
dbadmin = 8 (2.34%)
alert("Gist XSS");
@digininja
digininja / part2.rb
Created December 2, 2021 09:29
advent of code day two part two
aim=0
depth=0
forward=0
File.readlines('input.txt').each do |line|
if /([^ ]*) ([0-9]*)/ =~ line
puts "direction: " + $1 + " value " + $2 + "\n"
value = $2.to_i
movement = $1
if movement == "forward"
forward = forward + value
@digininja
digininja / part1.rb
Created December 2, 2021 09:28
advent of code day two part one
depth=0
forward=0
File.readlines('input.txt').each do |line|
if /([^ ]*) ([0-9]*)/ =~ line
puts "direction: " + $1 + " value " + $2 + "\n"
value = $2.to_i
movement = $1
if movement == "forward"
forward = forward + value
else
@digininja
digininja / day1_part2.rb
Created December 1, 2021 18:30
Solution to day 1 part 2 of advent of code challenge
count = 0
previous = 999999999999999
current = 0
block1=0
block2=0
block3=0
pos=0
File.readlines('input').each do |line|
num = line.to_i
@digininja
digininja / gist:d11e71184fed5db468eb68fc89afed39
Created October 15, 2020 09:18
Reset a git fork to its upstream master
git fetch upstream
git checkout master
git reset --hard upstream/master
git push origin master --force
10 PRINT "Hello"
20 GOTO 10
@digininja
digininja / dvwa_db_connection_test.php
Created August 8, 2018 15:06
Check for DVWA database connection issues
<?php
/*
Put this file in the root of the DVWA installation then access it through a browser.
*/
require_once "config/config.inc.php";
function var_dump_pre ($data) {
print "<pre>";
var_dump ($data);
@digininja
digininja / macro.php
Created January 24, 2018 20:49
Sample code to go with the Burp Macro blog post at https://digi.ninja/blog/burp_macros.php
<?php
session_start();
$message = "";
if ($_SERVER['REQUEST_METHOD'] == "POST") {
if (array_key_exists ("token", $_POST) && array_key_exists ("token", $_SESSION)) {
if (array_key_exists ("token", $_SESSION)) {
if ($_POST['token'] == $_SESSION['token']) {
$message = "Success";
@digininja
digininja / gist:d68f3c272778ec9a3299
Last active January 11, 2016 09:25
redis threaded pool queue
#!/usr/bin/env ruby
require "redis"
require "concurrent"
redis = Redis.new
redis.flushdb
pool = Concurrent::FixedThreadPool.new(
Concurrent.processor_count,