Skip to content

Instantly share code, notes, and snippets.

View oldkingcone's full-sized avatar
🏠
Working from home

oldkingcone oldkingcone

🏠
Working from home
View GitHub Profile
@oldkingcone
oldkingcone / Final_Project_birth_info.py
Created November 3, 2017 09:04
Final school project skeleton, need to add TKinter gui to this.
#! /usr/bin/env python3
# lab04_paraprinting.py
# oldkingcone
# Guns up, lets do this leeroy.
# LeeroyJenkins, circa 2005
import datetime
import os
import webbrowser
@oldkingcone
oldkingcone / directory_traversal.py
Created October 12, 2017 01:12
Updated Directory_traversal.py script, fixed get_tree_size function errors. Will print errors into log file
import os
import sys
import grp
import pwd
'''
There are 2 functions calling and doing the same thing. The accurate scan seems to preform much better with large file systems.
automation for ls /* in the event you want all output logged and already handled for you.
'''
os.system('clear')
@oldkingcone
oldkingcone / runuser.pl
Created October 12, 2017 01:06
Returns user at run time, will log into seperate file and leave human readable date/time with real username and logged in username. Add line ' perl runuser.pl' to your bashrc file to have it run upon TTY/Shell interaction.
#! /usr/tmp/env perl
use strict;
use 5.010;
my $user = $ENV{USER};
my $logname = $ENV{LOGNAME};
my $file_directory = "./ranby.txt";
# my $second_log = "./second.txt";
my $filename = "ranby.txt";
@oldkingcone
oldkingcone / directory_traversal.py
Created October 7, 2017 21:47
Traverse Directories, has no remote storage capability EG exporting to remote server. Saves found data inside a CSV file. Get an error on get_tree_size function.
import os
import sys
import grp
import pwd
from datetime import datetime as dt
os.system('clear')
os.chdir('/home')
os.system('pwd')
path2 = ['/', '/home/*', '/bin', '/usr', '/var', '/tmp', '/lib', '/lib64', '/etc', '/sys', '/dev', '/media', '/mnt', '/srv', '/sbin', '/etc']