Category: Scripts

Useful Tools that May Help Determine and Fix Hacked WordPress Installations

For one reason or another, your WordPress site may get hacked. Code may be attached to various files throughout the site that could do a wide range of things including site redirection. There are many different types of hacks, however, there are several tools and commands that may prove useful for remediation. If these tools do not re-mediate, then these…

Read More »

Delete Files That Are Older Than X Days in Windows

There was a need to delete log files that were older than a certain date from a folder on a Microsoft Windows based computer. This proved to be a difficult task to develop the proper command line that would accomplish this task. However there is a native Microsoft Windows command that does provide the necessary tools to delete files that…

Read More »

Google Books Downloader versus Pysheng to Download Google Books

Google Books Downloader is a little software that allows Google Books to be saved in PDF or JPEG format. It is a Windows based utility that will allow the downloading of a single book as a PDF, JPG or PNG in one of many resolutions ranging from 350px to 1280px. The default is 800px. The utility is a very effective…

Read More »

Perl Script to Backup Event Logs (Updated)

Years ago, I had hacked up various pieces of code to create a variant to the event logs backup scripts that are floating around the internet. There is a script that I have seen that comes with (at least) the Windows Perl releases. This is an updated script for use with Perl and Windows to backup event logs. The differences…

Read More »

Create an Adobe Reader 9.4.3 Package

Adobe updates their products in relatively frequent and regular intervals. Adobe Acrobat and Adobe Reader is no stranger to this practice. Since the launch of Adobe Reader 9.0 in 2008 and as of this writing, there has been 15 updates to that product alone. For some users, the automatic update feature is sufficient. If you are in an environment where…

Read More »

Linux: Count the number of processes running.

There was a need to determine the number of processes that was running on a Linux installation, specifically CentOS 5.6. I can’t find the source of this again, however, did use Google to find this information. Anyway, here is the command line needed. This command returned the desired results. The result will be a number, the number of processes that…

Read More »

Script to backup a domain controller systemstate with ntbackup.exe

A command line script was needed to backup the systemstate of Windows 2003 domain controller with the builtin Microsoft NTBackup utility called ntbackup.exe. The thebackroomtech has a respectable example of such a script from which I have created a modified version to better suit our requirements. This script was created to backup a Windows 2003 domain controller systemstate. To break…

Read More »

How to Disable IPv6 in Windows 7

We all have our reasons for wanting to do this, some may be for the “right” reasons, while others are not. It can be argued that disabling the IPv6 protocol is not appropriate and that it may effect some Windows functionality. However, IPv6 has been the culprit to some recent anomalies, including on a Windows Vista build where IIS could…

Read More »

Log Parse in Windows without Log Parser

Using the command line to parse through the logs is an alternate method to log parser. A benefit that this would serve over log parser is that this method will also parse Apache logs. Here is an example for parsing all logs in a specific folder for a specific IP address and writing to a new file called loglist.txt.

Read More »

Linux: Recursively Unzip All Files Into Their Existing Directory

A backup of every file in every sub-directory created zipped archives of each individual file. This was not the intended result. To resolve this each file must be restored to it’s original location and remove the created archive. Research directed me into a couple of different routes, that didn’t really work for me or produce the desired result. Here is…

Read More »

Automatic JBoss log compression using Linux

JBoss logs can take up gigabytes of space. The log rotation works well, however, there is no (not that I could find) means to compress in real-time. However, with a little work, this may be accomplished with a cron job. I am not going to go into too much detail or background, there are many sites that do this well….

Read More »

Microsoft Windows Update error 0x80240025

Recently attempted to update a Microsoft Windows XP workstation only to encounter an error message, error 0x80240025. According to one forum, it could be that of a Group policy to disable access to the Windows update. Error 0x80240025 denotes a Group Policy setting. If you check the registry for the DisableWindowsUpdateAccess key, you will likely find the following: S-1-5-18 maps…

Read More »

RHEL Logrotate Apache Logs Daily with Compression

Logrotate is a utility that creates new log files, as well as, renames and compresses the old log files. The basic logrotate paramaters are located in the /etc/lograotate.conf file. The Apache logrotate paramaters are stored in the /etc/logrotate.d/httpd file. The default Apache logrotate file will create a new log file and rename the old log file and may look like…

Read More »

Remove those Pesky Ads from Facebook

It is well documented how to add three elements to Adblock Plus for Firefox. However, I added another blocking rule to remove most of the remainder advertisements. The three Element Hiding Rules are facebook.com#*(social_ad) facebook.com#*(social_ad_advert) facebook.com#*(sponsers) I also added: http://www.facebook.com/ajax/emu/f.php?eid= Which resulted in many more ads being removed.

Read More »
MySQL

MySQL Rename a Database

Recently, I worked on a project where the database needed to be renamed. I found this script that worked perfectly. Source: StackOverflow

Read More »

Subversion on CentOS 5.4 installation guide

Subversion is an open source version control system. This article will detail an installation of Subversion on a CentOS 5.x / Red Hat Enterprise Linux (RHEL) 5.x workstation. Subversion used for this article is version 1.6.911. Install rpmforge repository RPMforge.net release file. This package contains apt, yum and smart configuration for the RPMforge RPM Repository, as well as the public…

Read More »

Tomcat default Administrator password

Tomcat 5.5 does not enable the admin or manager access by default. To allow for admin and manager access, the tomcat-users.xml file found in the /tomcat/conf directory. The original file may look like this. This is the modified file, adding manager and admin to the roles and usernames. Restart the Tomcat services, and you now have access to the administrative…

Read More »