Educause Security Discussion mailing list archives

Re: Windows GUI diff software with masking capability?


From: Gary Dobbins <dobbins () ND EDU>
Date: Fri, 2 Jan 2009 18:06:32 -0500

There's a program that used to be included with Visual Studio called WinDiff that may be close to what you're seeking.

-----Original Message-----
From: The EDUCAUSE Security Constituent Group Listserv
[mailto:SECURITY () LISTSERV EDUCAUSE EDU] On Behalf Of Justin Azoff
Sent: Friday, January 02, 2009 11:49 AM
To: SECURITY () LISTSERV EDUCAUSE EDU
Subject: Re: [SECURITY] Windows GUI diff software with masking capability?

On Wed, 2008-12-31 at 13:06 -0600, Youngquist, Jason R. wrote:
I’ve done some googling, and so far I haven’t found what I’m looking
for.  We have created a standard router template for all of our remote
campus routers.  What I’d like to be able to do is compare the router
template with the config from a router.  The issue is that there are
going to be a number of items such IP addresses, hostnames, etc. that
will be different between the two configuration files.  What I would
like is the ability to “mask out” these differences in the router
template, so differences in configuration will more easily stand out.
Does such a program exist?

This is easy enough to implement:

justin@dell /tmp % cat c.txt ip
dhcp excluded-address 10.159.1.100 10.159.1.254
ip dhcp excluded-address 10.159.65.200 10.159.65.254
ip address 1.2.3.4 255.255.255.0
ip address 1.2.3.5 255.255.255.0 secondary
hostname R1

justin@dell /tmp % ./mask.py c.txt
ip dhcp excluded-address $DHCP_EX_IP1 $DHCP_EX_IP2
ip dhcp excluded-address $DHCP_EX_IP1 $DHCP_EX_IP2
ip address $IP $NETMASK
ip address $IP_SEC $NETMASK_SEC secondary
hostname $HOSTNAME

for diffing something like this works:
gvimdiff <(./mask.py c1.txt) <(./mask.py c2.txt)

Something like that is probably doable in windows, though you might need
to write out temp files.  All you need to do is mask the two input files
and pass the result to your existing diff application.

I've been working on a similar program to sort IOS config files, so
something like

interface fa0/1
 speed 10
 duplex full

and

interface fa0/1
 duplex full
 speed 10


doesn't show up as a change.

--
-- Justin Azoff
-- Network Performance Analyst

Current thread: