Bash Script – Move Files into Subdirectories Based on Modified Date – OR – Moving Ntop Netflow Dumps into Subdirectories by Date

In a busy network environment, it is critical to have some form of network monitoring on all your servers and equipment. Network monitoring comes in many different forms and flavors, whether it be to monitor critical system services and applications via SNMP, WMI, or some proprietary third party software, or just generically pinging some devices to make sure they are up.

Nowadays, it is getting more and more necessary to dig deeper to be able to track what end users are doing and what websites they are visiting and this is where the Cisco Netflow comes in handy. Essentially, netflow allows us to peer down into the network traffic streams and give us vital source, destination, and protocol information coming to and from our network hosts but isn’t quite as storage intensive as doing a full fledged pcap dump, which makes historical accounting of this data a whole lot nicer.
Continue reading “Bash Script – Move Files into Subdirectories Based on Modified Date – OR – Moving Ntop Netflow Dumps into Subdirectories by Date”

Cannot Log onto Windows – Trust Relationship Failed

There’s several different things that can cause the trust relationship issue and there are hundreds of post or more online about the subject. Sometimes simply resetting the computer account in Active Directory can fix the problem. Other times, unjoining/rejoining the computer from the domain will fix the problem. If either of those isn’t the case, usually that is a good indication that there is some sort of corruption in the Active Directory database that can only be fixed by manual intervention.
Continue reading “Cannot Log onto Windows – Trust Relationship Failed”

Fuck You Microsoft, I Will Install the Cisco VPN Client on Windows 10 and Furthermore, You Can Suck It

Seriously man, fuck Microsoft, fuck Windows 10, and fuck you. No actually you are ok, as long as you don’t work for Microsoft or are some sort of freak MS enthusiast, but what kind of shithole stasi big brother state do we live in when your software vendor tells you what applications you can and can’t install on the operating system you purchased for your own PC? I mean I know they’ve been doing that shit for a long time, but tonight the stars revolt (seemingly misplaced Powerman 5000 reference).

I just had the joy of wasting an hour of my life getting the damn Cisco VPN client to work. When Windows 8 came out, there were a few workarounds to have to do, but now MS has stepped up their game of being total assclowns and won’t let you even run the installer. In your delight, you will receive the pleasantly authoritarian popup box that says, “This app can’t be run on this PC. Fan-fucking-tastic.
Continue reading “Fuck You Microsoft, I Will Install the Cisco VPN Client on Windows 10 and Furthermore, You Can Suck It”

Mac OS X – Install Yosemite/El Capitan via USB Thumb Drive or How to Get the DMG Image

Howdy folks, this is just another somewhat plagiaristic post for my own future reference. I found this info hyah and unfortunately I was unable to retrace my steps to find my original source on where to locate the .dmg file in the installer package.

Download the latest version of Yosemite/El Capitan from the App Store and make sure you’ve formatted your USB thumb drive with the Disk Utility. Then open up a terminal and issue the following commands:
Continue reading “Mac OS X – Install Yosemite/El Capitan via USB Thumb Drive or How to Get the DMG Image”

uTorrent – Don’t Have Permission to Uninstall the Program

There are certainly versions of uTorrent that have massive problems. Whether it be the inability to click on magnet links and open them properly inside the program or the never-ending issue where the program constantly tells you some shit about there being an update when you open it and says something along the lines of “you already have a more recent version of the program installed, would you like to downgrade?”. Just an FYI, downgrading doesn’t do shit, it’s an endless loop of futility, sad faces, and teardrops.

It is even more disturbing when you want to uninstall uTorrent to try and install a more recent beta version that doesn’t have all these bugs and when you try to remove it the conventional way, you receive the message “You do not have sufficient access to uninstall uTorrent. Please contact your system administrator.” and you are logged on as the user with administrator rights.
Continue reading “uTorrent – Don’t Have Permission to Uninstall the Program”

Ubuntu – Icecast2 Startup Script with Ices2 Support

Recently I set up an Icecast server to be able to stream music on hold to my Asterisk servers at work. Here is an updated init script for Icecast2 that adds support to start the Ices2 source client at the same time. For streaming audio from a playlist with Ogg support, Ices2 is a good candidate. For streaming audio from an mp3 based playlist, have a look at Ices0 that can be downloaded on the same site. There is also an array of different Icecast source clients to choose from here. This just happened to be the first one that I tried out. I ended up bastardizing the code somewhat to make it conform to my own personal preferences by using functions and what not to make it all pretty like. I also chose to run Ices2 as the same user as the icecast user, so you would have to update any permissions on the Ices2 directories and config files as needed.
Continue reading “Ubuntu – Icecast2 Startup Script with Ices2 Support”

Asterisk – How to Host a PRI Circuit with a Sangoma Card

These are just a few quick notes of mine on how to host a PRI circuit from a Sangoma card in an Asterisk server to another Asterisk server or wherever for that matter.

This config here is for a Sangoma A102 with two ports and Asterisk will provide the clocking source. Channels 1-23 will be the B channels and channel 24 will be the D channel for signaling. Echo cancelling will be enabled as well.

#autogenerated by /usr/sbin/wancfg_dahdi do not hand edit
#autogenrated on 2015-08-28
#Dahdi Channels Configurations
#For detailed Dahdi options, view /etc/dahdi/system.conf.bak

#Sangoma A102 port 1 [slot:4 bus:6 span:1] 

#Sangoma A102 port 2 [slot:4 bus:6 span:2] 

Continue reading “Asterisk – How to Host a PRI Circuit with a Sangoma Card”

PHP – Simple PDO Class for Connecting to a MySQL Database

Here’s an extremely basic, reusable PHP and MySQL based PDO class for easily connecting to multiple database servers simultaneously within a script without having to go through a bunch of hoopla. Tidbits have been pieced together from the following sources with a little tweaking of my own (such as the ability to have default database values or to pass them as arguments):–net-12059
Continue reading “PHP – Simple PDO Class for Connecting to a MySQL Database”

Windows Update Error 80073712 When Installing KB2943357 – OR – How to Repair Corrupted Windows Update Files on Windows 7 or Server 2008

Starting with Windows 8 and Server 2012, you can more easily fix corrupted updates using the “DISM.exe /Online /Cleanup-image /Restorehealth” command, but what about on Windows 7 or on Server 2008? Well, to be honest, it is kind of a pain in the ass and quite a lengthy process.

This seems to be a prime candidate for some sort of automated batch or PowerShell script that could parse out the bad updates from the log file, extract the needed files from the KB .msu packages, move them to the temp directory, and then re-run the System Update Readiness Tool. Lord knows it would save a lot of people some time and headaches but I don’t know whether it is even worth the hassle of programming it all seeing as how mainstream support for Windows 7 will be up soon and extended support will be around until 2020. That and I’m sure a lot of people have been suckered into upgrading to Windows 10 for free as well. It’s ok, there’s nothing in that giant wooden trojan horse that they just carted into your living room. Your data is safe and there are absolutely zero privacy concerns, trust them. Go back to sleep zombie.

Anyways, if you have installed any Server 2008  or Windows 7 operating systems in the last say year or so, you probably have noticed that Windows Update gets broken almost every single freaking time and it is quite cumbersome. So here is the cliff notes version on how to repair your corrupted Windows Update files.
Continue reading “Windows Update Error 80073712 When Installing KB2943357 – OR – How to Repair Corrupted Windows Update Files on Windows 7 or Server 2008”

Remote Desktop Server – Registry Key to Change RDP Listening Port

As you probably already know, by default, Microsoft Remote Desktop listens on port 3389. This is all good, but what if you are behind a firewall and wanted to allow port forwarding to be able to access multiple computers via RDP remotely but can’t because they are all running on the same port?

Well, if you’re crafty and have a decent Linux-based router like Mikrotik that will let you create packet mangling rules to change the destination port number, you can get around this, but in environments where you have little SOHO routers like Linksys or Belkin, typically this is where changing the port number that RDP listens on comes in handy. The only problem then is remembering whatever port you changed it to because then you have to specify it anytime you connect via RDP which can be a pain if you’ve got a bad memory. There are already a thousand and one articles out there to help you change the port number, this is a quick post for future reference for myself.
Continue reading “Remote Desktop Server – Registry Key to Change RDP Listening Port”