Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Quick and dirty interchange session viewer
#!/bin/env perl
use strict;
use warnings;
use DBI;
use Storable qw( thaw );
use Data::Dumper;
my $dsn = 'dbi:mysql:[DB NAME];host=[HOST NAME];';
my $user = '[USER]';
my $pass = '[PASS]';
my $session = $ARGV[0];
my $dbh = DBI->connect($dsn, $user, $pass)
or die $DBI::errstr;
my $sql = q|
SELECT session
FROM sessions
WHERE code like CONCAT(?, '%')
|;
my $sth = $dbh->prepare($sql)
or die $dbh->errstr;
$sth->execute($session)
or die $sth->errstr;
my @results = $sth->fetchrow_array;
if (@results) {
my $session_data = $results[0];
print Dumper( thaw( $session_data ) ) . "\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.