Tim's IT-Blog

Just a blog about IT and IT-Problems…

How read a Sonicwall Configuration as plain text

by admin_import on 02/09/2008

First export the setting via Web-GUI as exp-File (System –> Settings –> Export Settings).
Now create a new perl script for Base64-decoding on your host…


#!/usr/bin/perl
#Scriptname: decode

use strict;
use MIME::Base64;

local($/) = undef; # slurp

my $decoded = decode_base64(<STDIN>);
$decoded =~ s/&/n/gms;
print $decoded;

… and decode the file with the Sonicwall configuration:

cat sonicwall-PRO_xxxx_Enhanced-3_x_x_x-xxx.exp | ./decode

Here is an example of a Sonicwall Configuration:

checksumVersion=1
buildNum=3.x.x.x-xxx
userIV=xxxxxxxxxxxxx
passwordUniqueNum=0
cfspName_0=Default
cfspOptionMask_0=7
cfspCatMask_0=255,15,0,0,0,0,0,0
cfsPolicyTime_0=
cfspInUse_0=1
zoneObjId_0=LAN
zoneObjProperties_0=50973
zoneObjCflProfile_0=0
zoneObjCfspId_0=Default
zoneObjSslCtrlProfile_0=0
zoneObjZoneType_0=1
zoneObjIntraZoneCom_0=1
zoneObjAvProfile_0=0
zoneObjASProfile_0=0
zoneObjGavProfile_0=0
zoneObjGscProfile_0=0
zoneObjGroupVpn_0=0
zoneObjMyIDPProfile_0=0
zoneObjEnforceWiFi_0=0
zoneObjEnforceSslvpn_0=0
zoneObjSslvpnIp_0=
zoneObjSslvpnPort_0=
zoneObjWiFiException_0=0
zoneObjWiFiExceptionHandle_0=
zoneObjRestrictVpnTrav_0=0
zoneObjAllowWPA_0=0
zoneObjSonicPointProfHandle_0=
zoneObjSonicPointOnly_0=0
...

Works on:

  • SOHO 3
  • SOHO TZW
  • TZ 150
  • TZ 170
  • TZ 180
  • TZ 190
  • PRO 1260
  • PRO 2040
  • PRO 3060
  • PRO 4060
  • PRO 4100
  • PRO 5060