Posted by admin on Jun 18, 2009 in
Software
This is a list of windows utilities that can be used to clean some of the nastiest PC infections. Links are provided for reference only. Use at your own risk.
Malware Removal Software
Malwarebytes – This is a great program. Download the free version and scan every couple of weeks or so. Remove everything it finds. The paid version works wonders and will keep you from repeated trips to the virus removal Dr.
Advanced Users
ComboFix – This is an aggressive application and should be used with caution. It targets some of the hardest to remove infections. You should still scan with malwarebytes after running combofix. Although I have not had any problems with combofix, the way it removes infections could leave a computer unable to boot. At which point you would need to contact someone who knows how to recover from such a mishap. Unfortunately most tech’s don’t know how and will tell you that you need to reinstall windows. Read the User Guide for more info.
Hijackthis – Only use this if you know what you are doing. It’s great for tuning up the PC. You can removing startup items and browser helper objects with this utility. You can also break things so be careful.
Antivirus Software
Avast Home Edition – Simple easy to use antivirus software. Must register every year. No issues running along side the paid version of Malwarebytes.
Firewall Software
To the amazement of many colleagues, for a home PC, I don’t recommend anything more then turning on your Windows firewall. If you connect via cable modem I suggest a NAT based broadband router to give an extra layer of protection. All of the other firewall software out there tends to slow down the PC and asks questions that the average user doesn’t know how to answer. This leads to one or both of two issues. Programs that should be allowed access to the network are blocked and the computer doesn’t work right or things that should be blocked are allowed access.
Tags: free software, malware, utilities, virus
Posted by admin on Jun 18, 2009 in
My Notes
Have a file or directory that you can’t delete because there is a space at the end of the file name?
If you try and delete from windows you will get the error message
“Error Deleting File or Folder”
“Cannot delete file: Cannot read from the source file or disk.”
To manipulate these files you need to address their absolute path with the prefix of “\\?\”
To do this you need to access these files from the command line.
Start -> Run -> CMD
del “\\?\c:\dir\filename ”
Make sure to include the quotes in above command.
For more information see – http://msdn.microsoft.com/en-us/library/aa365247.aspx
Posted by admin on Jun 18, 2009 in
Scripts
#!/bin/bash
#This example is for a linux server using the following directory stucture to store email
#/home/unix-username/mail/domain/email-username/Maildir/.INBOX.spam/(cur | new)
#the following command will find all spam messages system wide over 14 days old and remove them
/usr/bin/find /home/*/mail/*/*/Maildir/.INBOX.spam/*/ -type f -ctime +14 | xargs /bin/rm -f
#-ctime n*24 hours
#-cmin n minutes
#-ctime +7 = > 1 week
Tags: bash, linux, Maildir, purge spam, Scripts
Posted by admin on Jun 18, 2009 in
Scripts
When removing 10,000’s of files with rm -f * you get an argument too long error.
#### Remove too man files.
#### First find -name ‘*’ > filelist
#!/bin/bash
for i in $( cat filelist );
do
echo $i
rm -f $i
done
#####
##### Easier way to remove too many files right from command line
#####
ls|xargs rm -f
Tags: bash, linux, Scripts
Posted by admin on Jun 18, 2009 in
Scripts
#########
#
# change the same value in all files showen under ls in a directory
# good for mass IP changes
#
##########
#!/bin/bash
for i in $( ls );
do
sed -i ’s/find/replace/g’ $i
done
Tags: bash, linux, Scripts
Posted by admin on Jun 18, 2009 in
Scripts
#!/bin/bash
while read line;
do echo “<option>$line</option>” >> cities.out;
done < cities.in
# above processes a text file where a line item might contain spaces
# a for loop that cat’s the file will process each space as a separate item
#!/bin/bash
x=1
while [ $x -le 100 ]
do
echo “Hello World – $x times”
x=$(( $x + 1 ))
done
Posted by admin on Jun 18, 2009 in
Scripts
My Notes
#######
#
## Command Line Input – Create single secondary entry
#
#####
#!/bin/bash
# Edit IP variable to equal the IP address of the master name server
IP=10.0.0.1
echo -n “Enter Domain Name: ”
read name
echo “zone \”$name\” { type slave; masters { $IP; }; file \”/var/named/$name.sec\”; };” >> /etc/named.conf.secondary
#######
# Make Secondary named.conf file
# FROM MASTER named.conf
#######
#!/bin/bash
IP=10.0.0.1
cat /etc/named.conf |grep zone |grep -v “type slave”|grep -v named.ca|cut -d \” -f2 > secondarylist.txt
dt=$(date)
echo “// Vitex Secondary Zones $dt” > named.conf.secondary
for i in $( cat secondarylist.txt ); do
echo “zone \”$i\” { type slave; masters { $IP; }; file \”secondary/$i.sec\”; };” >> named.conf.secondary
echo item: $i
done
############
#
# PHP version
#
#######
<?php
define(’IP’,'10.0.0.1′);
function Main($file=’named.conf.secondary’)
{
if (!strlen($file) ||
!is_readable($file) ||
!is_file($file)) die(’Could not open file.’);
$cnt = file($file);
$fmt = array(’zone “%s” {’);
$fmt[] = ‘ type slave;’;
$fmt[] = ‘ file “secondary/%s.sec”;’;
$fmt[] = ‘ masters { %s; };’;
$fmt[] = ‘};’;
$fmt = join(”\n”,$fmt);
foreach($cnt as $line)
printf($fmt.”\n\n”,rtrim(substr($line, 4)),rtrim(substr($line,4)),IP);
}
if ($_SERVER['argc'] < 2) printf(”Usage: %s <file>\n”,$_SERVER['argv'][0]);
else Main($_SERVER['argv'][1]);
?>
Tags: bash, bind, linux, Scripts
Posted by admin on Jun 11, 2009 in
Uncategorized
Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!