This repository has been archived by the owner on Mar 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
proximity_controller
executable file
·76 lines (64 loc) · 2.93 KB
/
proximity_controller
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
#!/usr/bin/perl
#############################################################################################
#
#__________ .__ .__ __
#\______ \_______ _______ __|__| _____ |__|/ |_ ___.__.
# | ___/\_ __ \/ _ \ \/ / |/ \| \ __< | |
# | | | | \( <_> > <| | Y Y \ || | \___ |
# |____| |__| \____/__/\_ \__|__|_| /__||__| / ____|
# \/ \/ \/
#
# proximity_server
#
# Copyright (C) 2012, Silas Cutler
# <Silas.Cutler@BlackListThisDomain.com / SCutler@SecureWorks.com>
#
# This program is free software; you can redistribute it and/or modify it without restriction.
# Any implimentation or profitting from this code requires the consent of the original
# author. Any updates or impovements are not required to be shared with the author, but
# encoraged.
#
# This software is provided as is. The author or any associated parties are not liable for
# any use of this software or any damage that may occur from this software.
#
#############################################################################################
# v0.8
#############################################################################################
use strict;
use warnings;
use DBI;
use Getopt::Long;
use Config::Simple;
require 'etc/config.pm';
require 'lib/functions.pm';
require 'lib/db.pm';
#Database Functions & DB Connection
our ($dbh );
#Input Handling.
our ($add_filter,$dis_filter, $list_filter,$enable_filter, $list_filter_dis, $help);
controller_usage() if ( ( @ARGV < 1 or ! GetOptions(
'help|?' => \$help,
'add-filter|af' => \$add_filter,
'dis-filter|df' => \$dis_filter,
'enable-filter|ef' => \$enable_filter,
'list-filters|lf' => \$list_filter,
'list-filters-disabled|ld' => \$list_filter_dis,
)or defined $help ) );
if ( defined($add_filter)) { add_filter (); }
if ( defined($dis_filter)) { disable_filter (); }
if ( defined($list_filter)) { list_filters_active (); }
if ( defined($list_filter_dis)) { list_filters_disabled (); }
if ( defined($enable_filter)) { enable_filter(); }
sub controller_usage{
print "Proximity - proximity-controller 1.0 \n - Silas Cutler 2012\n\n";
print "usage: ./$0
-add-filter ( -af ) - Add Filter
-disable-filter ( -df ) - disable filter
-enable-filter ( -ef ) - enable filter
--------------
-list-filters (-lf ) - List all active Filters
--------------
-list-filters-disabled (-ld ) - List all Disabled Domains
\n";
exit;
}