Posts By: jonny

Get Image Dimensions on the COmmand Line

Occasionally useful to find out the dimensions of an image without having to load an image editor or file manager. From the ImageMagick toolkit: identify myimage.jpg tiffinfo myimage.tif pnginfo myimage.png

SquidGuard LDAP User Search and Special Characters

So I had a problem with the ldapusersearch string as some eejit has created an OU with spaces and an apostrophe in the name. So the characters are represented as: comma %2c space %20 apostrophe %27 For example (entirely fictional organisation): src staff { ldapusersearch  ldap://dc.ads.domain.uk:3268/dc=ads,dc=domain,dc=uk?sAMAccountName?sub?(&(sAMAccountName=%s)(memberOf=cn=All%20Staff%2cOU=King%27s%20College%20Dublin%2cdc=ads%2cdc=domain%2cdc=uk)) }  

Squid 3 Warning

WARNING: (B) ‘::/0’ is a subnetwork of (A) ‘::/0’ I had this warning when restarting squid 3. I had a line left over from squid 2: acl all src 0.0.0.0/0.0.0.0 which I had subsequently changed to acl all src all as I received a CIDR warning. So to get rid of the subnetwork warning I… Read more »

Building RPMs for Squid, SquidGuard

Squid Get a few dependencies to get the ball rolling: yum -y groupinstall “Development Tools” yum -y install rpm-build openjade linuxdoc-tools openldap-devel pam-devel openssl-devel httpd rpm-devel expat-devel db4-devel libpcap-devel Browse http://www.jur-linux.com/rpms/el-updates/5Client/SRPMS/ and find the latest Source RPM for your architecture, then install the sprm e.g. wget http://www.jur-linux.com/rpms/el-updates/5Client/SRPMS/squid-3.1.12-2.el5.src.rpm rpm -ivh squid*.src.rpm This does not actually install… Read more »

Anti-Virus Software on Linux

A friend contacted me today running an Ubuntu live CD and trying to scan a windows drive for viruses. So for future reference the following antivirus packages can be tried: BitDefender Avira AVG Clam Clam is in the repositories so you don’t need to specifically download it – just search within the Software Center e.g…. Read more »

Installing GDL an IDL alternative

The Gnu Data Language is an interactive interpreter/incremental compiler for the GNU Data Language, which is primarily used in scientific, astronomical, medical and geo-science data processing applications. It supports graphical output and is intentionally designed to be highly compatible with the commercial IDL language. GDL is a free IDL (Interactive Data Language) compatible incremental compiler… Read more »

GDL Editors on Linux

For editing GDL / IDL .pro files on Linux you can of course use any Text Editor (gedit, vi) or the IDLDE, but the following could prove useful: 1. Kate Kate is a text editor for the KDE desktop environment but looks just as good on a Gnome Desktop (Ubuntu default). Kate has built-in support… Read more »

K3B Buring CDs with MP3s

Creating an Audio CD in K3B (my favourite CD burning software) I received an error that MP3 format was not supported and that the files need to be converted to WAV format first. Problems while adding files to the project. Unable to handle the following files due to an unsupported format:You may manually convert these… Read more »

Grepping for LizaMoon infected website files

The Liza Moon attack targets Microsoft SQL Server installations injecting javascript tags into website files. Although we are primarily using Unix/Linux servers I performed some scans using the following to check for lizamoon infection: find . -type f -exec egrep “\<script src=http\:\/\/.*\/ur\.php” {} \; On Windows Server I used Powershell and the following command: Get-ChildItem… Read more »

Bash: Looping through Files with Spaces

I was trying to move some miscellaneous music files into directories by artist name. The files (and folders) have spaces in the file names. For my first attempt I tries a for loop e.g. for file in $(find /path/to/music -type f); do … done A for loop will not do this regardless of how much… Read more »