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 python | |
import os | |
import sys | |
import time | |
import random | |
import string | |
import json | |
import hashlib | |
import socket |
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 python | |
print 'hello' |
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
use File::Tail; | |
my @errors = (’Bad protocol version identification’,'Failed password’,'Did not receive identification string’); | |
my $line; | |
my $file = File::Tail->new(”/var/log/auth.log”); | |
while (defined($line=$file->read)) { | |
if ($line =~ /$errors[0]|$errors[1]|$errors[2]/) { | |
open(SSHALERT, “>/tmp/sshalert.txt”); | |
print SSHALERT “$line”; |
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/perl | |
use strict; | |
open(DID, ">>/path/to/iDid.txt"); | |
my $time = &gettime(); | |
sub gettime { | |
my @timearray = (my $_sec,my $_min,my $_hour,my $_mday,my $_mon,my $_year,my $_wday,my $_yday,my $_isdst) = localtime(time); | |
my $months = ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec')[(localtime)[4]]; |
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
#!/bin/bash | |
logger System VM Weekly Snapshot Begin | |
vmrun snapshot /dir/to/vm/images/image_name.vmx weekly_auto_backup | |
vmrun snapshot /dir/to/vm/images/image_name.vmx weekly_auto_backup | |
mount /dev/name /mnt/location | |
rsync -avg --ignore-errors /dir/to/vm/images/ /mnt/location/VM-BACKUP/ | |
umount /dev/name | |
logger System VM Weekly Snapshot Complete |
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
use strict; | |
use File::Tail; | |
use Net::Syslog; | |
my $s=new Net::Syslog(Facility=>’local7′,Priority=>’System’,SyslogPort=>’514′,SyslogHost=>’10.0.0.5′); | |
my $log=File::Tail->new(’c:windowssystem32logfilesw3svc1www.log’); | |
while (defined(my $line=$log->read)) { | |
$s->send($line,Priority=>’system’); | |
} |
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
package org.example.video; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.widget.VideoView; | |
import android.util.Log; | |
public class Video extends Activity { | |
public static final String TAG = "Video"; |
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
laptop01:~ root# diskutil resizeVolume disk3s1 250M | |
Started partitioning on disk3s1 part1 | |
Verifying disk | |
Resizing | |
Finished partitioning on disk3s1 part1 | |
/dev/disk3 | |
#: TYPE NAME SIZE IDENTIFIER | |
0: GUID_partition_scheme *524.0 MB disk3 | |
1: Apple_HFS part1 250.0 MB disk3s1 |
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
laptop01:~ root# diskutil list | |
/dev/disk0 | |
#: TYPE NAME SIZE IDENTIFIER | |
0: GUID_partition_scheme *320.1 GB disk0 | |
1: EFI 209.7 MB disk0s1 | |
2: Apple_HFS Macintosh HD 319.7 GB disk0s2 | |
/dev/disk1 | |
#: TYPE NAME SIZE IDENTIFIER | |
0: GUID_partition_scheme *128.0 GB disk1 | |
1: EFI 209.7 MB disk1s1 |
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
[root@bubbles.t3ch.com ~]# vmware-toolbox-cmd disk list | |
/ | |
/boot | |
[root@bubbles.t3ch.com ~]# vmware-toolbox-cmd disk shrink / | |
Progress: 100 [===========>] |