# disallow access for these filetypes
#
#
#.zip  # Windows compressed file

{
    use esmith::config;
    use esmith::db;

    my %dungog;
    tie %dungog, 'esmith::config', '/home/e-smith/db/dungog';

    $OUT = '';

    #banned extention list
    my $exe   = db_get_prop(\%dungog, 'bannedextf5', "exe")   || '';
    my $macro = db_get_prop(\%dungog, 'bannedextf5', "macro") || '';
    my $arc   = db_get_prop(\%dungog, 'bannedextf5', "arc")   || '';
    my $time  = db_get_prop(\%dungog, 'bannedextf5', "time")  || '';
    if ($exe eq 'on')
    {
      $OUT .= "# The following file extensions can contain executable code.\n";
      $OUT .= "# This means they can potentially carry a virus to infect your computer.\n";
      $OUT .= "\n";
      $OUT .= ".ade  # Microsoft Access project extension\n";
      $OUT .= ".adp  # Microsoft Access project\n";
      $OUT .= ".asx  # Windows Media Audio / Video\n";
      $OUT .= ".bas  # Microsoft Visual Basic class module\n";
      $OUT .= ".bat  # Batch file\n";
      $OUT .= ".cab  # Windows setup file\n";
      $OUT .= ".chm  # Compiled HTML Help file\n";
      $OUT .= ".cmd  # Microsoft Windows NT Command script\n";
      $OUT .= ".com  # Microsoft MS-DOS program\n";
      $OUT .= ".cpl  # Control Panel extension\n";
      $OUT .= ".crt  # Security certificate \n";
      $OUT .= ".dll  # Windows system file\n";
      $OUT .= ".exe  # Program\n";
      $OUT .= ".hlp  # Help file\n";
      $OUT .= ".ini  # Windows system file\n";
      $OUT .= ".hta  # HTML program\n";
      $OUT .= ".inf  # Setup Information\n";
      $OUT .= ".ins  # Internet Naming Service\n";
      $OUT .= ".isp  # Internet Communication settings\n";
      $OUT .= ".lnk  # Windows Shortcut\n";
      $OUT .= ".mda  # Microsoft Access add-in program \n";
      $OUT .= ".mdb  # Microsoft Access program\n";
      $OUT .= ".mde  # Microsoft Access MDE database\n";
      $OUT .= ".mdt  # Microsoft Access workgroup information \n";
      $OUT .= ".mdw  # Microsoft Access workgroup information \n";
      $OUT .= ".mdz  # Microsoft Access wizard program \n";
      $OUT .= ".msc  # Microsoft Common Console document\n";
      $OUT .= ".msi  # Microsoft Windows Installer package\n";
      $OUT .= ".msp  # Microsoft Windows Installer patch\n";
      $OUT .= ".mst  # Microsoft Visual Test source files\n";
      $OUT .= ".pcd  # Photo CD image, Microsoft Visual compiled script\n";
      $OUT .= ".prf  # Microsoft Outlook profile settings\n";
      $OUT .= ".pif  # Shortcut to MS-DOS program\n";
      $OUT .= ".reg  # Windows registry entries\n";
      $OUT .= ".scr  # Screen saver\n";
      $OUT .= ".scf  # Windows Explorer command\n";
      $OUT .= ".sct  # Windows Script Component\n";
      $OUT .= ".sh   # Shell script\n";
      $OUT .= ".shs  # Shell Scrap object\n";
      $OUT .= ".shb  # Shell Scrap object\n";
      $OUT .= ".sys  # Windows system file\n";
      $OUT .= ".url  # Internet shortcut\n";
      $OUT .= ".vb   # VBScript file\n";
      $OUT .= ".vbe  # VBScript Encoded script file\n";
      $OUT .= ".vbs  # VBScript file\n";
      $OUT .= ".vxd  # Windows system file\n";
      $OUT .= ".wsc  # Windows Script Component\n";
      $OUT .= ".wsf  # Windows Script file\n";
      $OUT .= ".wsh  # Windows Script Host Settings file\n";
      $OUT .= ".otf  # Font file - can be used to instant reboot 2k and xp\n";
      $OUT .= ".ops  # Office XP settings \n";
      $OUT .= "\n";
    }
    if ($macro eq 'on')
    {
      $OUT .= "# Files which one normally thinks as non-executable but\n";
      $OUT .= "# can contain harmful macros and viruses\n";
      $OUT .= "\n";
      $OUT .= ".doc  # Word document\n";
      $OUT .= ".xls  # Excel document\n";
      $OUT .= ".pps  # powerpoint document\n";
      $OUT .= "\n";
    }
    if ($arc eq 'on')
    {
      $OUT .= "# Other files which may contain files with executable code\n";
      $OUT .= "\n";
      $OUT .= ".gz   # Gziped file\n";
      $OUT .= ".tar  # Tape ARchive file\n";
      $OUT .= ".zip  # Windows compressed file\n";
      $OUT .= ".rar  # Windows compressed file\n";
      $OUT .= ".arj  # Windows compressed file\n";
      $OUT .= ".tgz  # Unix compressed file\n";
      $OUT .= ".bz2  # Unix compressed file\n";
      $OUT .= ".cdr  # Mac disk image\n";
      $OUT .= ".dmg  # Mac disk image\n";
      $OUT .= ".smi  # Mac self mounting disk image\n";
      $OUT .= ".sit  # Mac compressed file\n";
      $OUT .= ".sea  # Mac compressed file, self extracting\n";
      $OUT .= ".bin  # Mac binary compressed file\n";
      $OUT .= ".hqx  # Mac binhex encoded file\n";
            $OUT .= "\n";
    }
    if ($time eq 'on')
    {
      $OUT .= "# Time/bandwidth wasting files\n";
      $OUT .= "\n";
      $OUT .= ".mp3  # Music file\n";
      $OUT .= ".mpeg # Movie file\n";
      $OUT .= ".mpg  # Movie file\n";
      $OUT .= ".avi  # Movie file\n";
      $OUT .= ".asf  # this can also exploit a security hole allowing virus infection\n";
      $OUT .= ".iso  # CD ISO image\n";
      $OUT .= ".ogg  # Music file\n";
      $OUT .= ".wmf  # Movie file\n";
      $OUT .= ".bin # CD ISO image\n";
      $OUT .= ".cue # CD ISO image\n";
    }
}