/
bandwidthcontrol.pl
75 lines (63 loc) · 1.7 KB
/
bandwidthcontrol.pl
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
#!/usr/bin/perl
##################################################
# File Name: bandwidthcontrol.pl
# Startfile :D
# Version 1.0
# 4th May, 2010
# BY: Mohammad Amzad Hossain
# Blog: tohin.wordpress.com
# Email : amjad.hossain@gamil.com
# Comment: Alows multi-servers to run on same PC.
###################################################
use isp::dbutil;
use isplib::message;
use isplib::func;
use isplib::isptc;
#dbutil->insert_client( 8, 'tohin', '00:', 233, 333);
message->show_message('STARTUP');
my $user_input = '0';
while( true )
{
message->show_message('INIT_CMD');
$user_input = func->promptUser( );
if( $user_input == '1' )
{
# Creating Shell File :)
message->sys_msg("Going to Execute");
isptc->execute_traffic_shapping();
}
elsif( $user_input == '2' )
{
# Going to Create New Client
func->create_new_client();
}
elsif( $user_input == '3' )
{
# Updating Client Information
func->update_client_info();
}
elsif( $user_input == '4')
{
# show settings for IP
func->show_ip_info( );
}
elsif( $user_input == '5')
{
# show all available IP
func->show_all_ip_list();
}
elsif( $user_input == '6')
{
# Deleting Client's Info
func->delete_client_info();
}
elsif( $user_input == 'q')
{
&sys_msg("BYE BYE");
last;
}
else
{
&sys_msg("Wrong Input. Try Again!");
}
}