This file contains hidden or 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
# just stick this in your .bashrc... | |
headers () { curl -ksLIX HEAD "$1" ; } # in lieu of $ lynx -head -dump $1 |
This file contains hidden or 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
#!/bin/bash | |
# STATUS: proof of concept. TODO: scan syslog as well, with | |
# forward-compatibility for systemd's journalctl syslog also | |
# WARNING: this may have bugs. | |
# CONFIGURE THIS VARIABLE ...based on BIT config file, but here | |
# it is hard coded for rapid prototyping | |
DEPTH=6 |
This file contains hidden or 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
for i in `seq -f "%02g" 0 200`; do dd if=/dev/random of=${i}.test bs=1M count=1; done |
This file contains hidden or 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/ perl | |
use strict; | |
use warnings; | |
use 5.019; | |
use lib './lib'; | |
use My::App::Schema; |
This file contains hidden or 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
#!/bin/bash | |
# skeleton code; you will need to customize to suit | |
# you need to set up your database and install DBIx::Class::Schema::Loader | |
# along with any DBIC components you use below | |
cd /var/projects/My/App | |
dbicdump -o components='["TimeStamp","PassphraseColumn"]' -o dump_directory=./lib My::App::Schema dbi:mysql:dfwpm dfwpm dfwpm '{ AutoCommit => 1 }' |
This file contains hidden or 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 perl | |
use strict; | |
use warnings; | |
use 5.010; | |
use Data::Dumper; | |
my $cmdstr = q{/usr/local/bin/ssh %s '/opt/something/bin/somebinary || echo "Could not execute somebinary"' -a -abc --verbose --name="tommy butler" --color="blue" --quote="'to be'" /tmp /foo}; |
This file contains hidden or 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
cp Changes Changesx ; grep -P '^\d' Changes | perl -MTime::ParseDate -nE 'chomp; $_ =~ s/.*?\s//; $orig = $_; $_ = Time::ParseDate::parsedate( $_ ); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime( $_ ); $mon+=1; $year+=1900; say sprintf "%4d-%02d-%02d | $orig", $year, $mon, $mday;' | while read parseddate; do echo "$parseddate" | perl -MFile::Util -E '$file = shift @ARGV; $ftl = File::Util->new; $content = $ftl->load_file( $file ); undef $/; $swap = <>; chomp $swap; ( $good, $bad ) = split / \| /, $swap; $content =~ s/\Q$bad\E/$good/smg; $ftl->write_file( $file => $content )' Changesx; echo "$parseddate"; done | |
# the fixed file is in "Changesx" |
This file contains hidden or 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
#!/bin/bash | |
# install the smartctl package first! (apt-get install smartctl) | |
if sudo true | |
then | |
true | |
else | |
echo 'Root privileges required' |
This file contains hidden or 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 bash | |
### BEGIN INIT INFO | |
# Provides: vmwareautostart | |
# Required-Start: $vmware $network $syslog | |
# Required-Stop: $vmware $network $syslog | |
# X-Start-Before: | |
# X-Stop-After: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 |
This file contains hidden or 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
Binary files PAR-Packer-1.015/a.out and PAR-Packer-1.015-patched-for-suid/a.out differ | |
diff -ruN PAR-Packer-1.015/myldr/boot.c PAR-Packer-1.015-patched-for-suid/myldr/boot.c | |
--- PAR-Packer-1.015/myldr/boot.c 2013-10-13 23:04:49.243648696 -0500 | |
+++ PAR-Packer-1.015-patched-for-suid/myldr/boot.c 2013-10-12 20:18:12.000000000 -0500 | |
@@ -135,7 +135,7 @@ | |
stmpdir = par_mktmpdir( argv ); | |
if ( !stmpdir ) DIE; /* error message has already been printed */ | |
- rc = my_mkdir(stmpdir, 0700); | |
+ rc = my_mkdir(stmpdir, 0777); |