This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am digininja on github. | |
* I am digininja (https://keybase.io/digininja) on keybase. | |
* I have a public key whose fingerprint is 79D0 248B 504B 5B30 6911 7DEF D671 D402 E447 F6DB | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Pick up a crashed Eyewitness session and generate a report from it. | |
# | |
# Robin Wood robin@digi.ninja https://digi.ninja | |
# | |
report = File.open "report.html", "w" | |
screens_files = Dir["screens/*"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "redis" | |
redis = Redis.new | |
redis.flushdb | |
redis.zincrby("colours", 1, "red") | |
redis.sadd("colours:base:red", "thread") | |
redis.zincrby("colours", 1, "red") | |
redis.sadd("colours:base:red", "red box") | |
redis.zincrby("colours", 1, "green") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require "redis" | |
require "concurrent" | |
redis = Redis.new | |
redis.flushdb | |
pool = Concurrent::FixedThreadPool.new( | |
Concurrent.processor_count, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 PRINT "Hello" | |
20 GOTO 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git fetch upstream | |
git checkout master | |
git reset --hard upstream/master | |
git push origin master --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
count = 0 | |
previous = 999999999999999 | |
current = 0 | |
block1=0 | |
block2=0 | |
block3=0 | |
pos=0 | |
File.readlines('input').each do |line| | |
num = line.to_i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
OlderNewer