SHARE
TWEET

Untitled

a guest May 31st, 2017 512 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/perl -w
  2. # Autoconf for PlexusIRCd by miniCruzer
  3. # Thanks to jburges for providing configuration.
  4. # Email bugs/comments to miniCruzer@InsaneIRC.com
  5. use strict;
  6. use Term::ANSIColor; # Colors
  7. my $conffile = "ircd.conf";
  8. system('rm -rf *.example'); # Deletes pre-existing example files.
  9. unlink $conffile if -e 'ircd.conf'; # if ircd.conf exists, erase it.
  10.  
  11. # Subroutine to generate Cloak Keys
  12. sub randomPassword {
  13. my $password;
  14. my $_rand;
  15. my $password_length = $_[0];
  16.     if (!$password_length) {
  17.         $password_length = 10;
  18.     }
  19. my @chars = split(" ",
  20.     "a b c d e f g h i j k l m n o
  21.    p q r s t u v w x y z
  22.    0 1 2 3 4 5 6 7 8 9");
  23. srand;
  24.     for (my $i=0; $i <= $password_length ;$i++) {
  25.         $_rand = int(rand 41);
  26.         $password .= $chars[$_rand];
  27.     }
  28.     return $password;
  29. }
  30.  
  31. # Cloak keys
  32. my $Cloak1 = randomPassword(20);
  33. my $Cloak2 = randomPassword(20);
  34. my $Cloak3 = randomPassword(20);
  35. print "PleXuS IRCd may require extra configuration. This will simply generate the\n";
  36. print "config. Do not expect this to start without minor altercations.\n";
  37. print "What is the server's name?\n";
  38. my $ServName = <STDIN>;
  39. chomp($ServName);
  40. print "What is the network name?\n";
  41. my $NetName = <STDIN>;
  42. chomp($NetName);
  43. print "What is the network address? (Example: $NetName.com / $NetName.org / $NetName.net)\n";
  44. my $NetAddress = <STDIN>;
  45. chomp($NetAddress);
  46. print "What is your full name?\n";
  47. my $FullName = <STDIN>;
  48. chomp($FullName);
  49. print "What IP are we binding on? (* is acceptable)\n";
  50. my $BindIP = <STDIN>;
  51. chomp($BindIP);
  52. print "What is your e-mail address?\n";
  53. my $MyEmail = '';
  54. $MyEmail = <STDIN>;
  55. chomp($MyEmail);
  56. print "What is your IP address?\n";
  57. my $MyIP = <STDIN>;
  58. chomp($MyIP);
  59. print "What is your hostname? (What does your IP resovle to?)\n";
  60. my $MyHost = <STDIN>;
  61. chomp($MyHost);
  62. print "What do you want your spoof to be? (Example: i.still.hate.packets)\n";
  63. my $MySpoof = <STDIN>;
  64. chomp($MySpoof);
  65. print "What do you use as an IRC Nickname?\n";
  66. my $MyNick = <STDIN>;
  67. chomp($MyNick);
  68. print "What services are we using? (Example: services.$NetName.com)\n";
  69. my $Services = <STDIN>;
  70. chomp($Services);
  71. print "What password do you wish to oper-up with?\n";
  72. my $MyPassword = <STDIN>;
  73. chomp($MyPassword);
  74.  
  75. my $config = qq(
  76.     serverinfo
  77. {
  78.     name = "$ServName";
  79.     sid = "42D";
  80.     description = "$NetName - Client Server";
  81.     network_name = "$NetName";
  82.     network_desc = "$NetName IRC Network";
  83.     hub = yes;
  84.        vhost = "$BindIP";
  85.     max_clients = 512;
  86.        rsa_private_key_file = "etc/ssl/rsa.key";
  87.        ssl_certificate_file = "etc/ssl/cert.pem";
  88. };
  89.  
  90. admin
  91. {
  92.     name = "$FullName";
  93.     description = "$ServName Server Administrator";
  94.     email = "<$MyEmail>";
  95. };
  96.  
  97. log
  98. {
  99.     use_logging = yes;
  100.     fuserlog = "logs/userlog";
  101.     foperlog = "logs/operlog";
  102.     ffailed_operlog = "logs/foperlog";
  103.     log_level = L_INFO;
  104. };
  105.  
  106. class
  107. {
  108.     name = "users";
  109.     ping_time = 90 seconds;
  110.     number_per_ip = 3;
  111.     max_local = 3;
  112.     max_global = 10;
  113.     max_number = 5000;
  114.     cidr_bitlen_ipv4 = 24;
  115.     cidr_bitlen_ipv6 = 120;
  116.     number_per_cidr = 16;
  117.     sendq = 1 megabyte;
  118. };
  119.  
  120. class
  121. {
  122.     name = "opers";
  123.     ping_time = 90 seconds;
  124.     number_per_ip = 10;
  125.     max_number = 100;
  126.     sendq = 2 megabytes;
  127. };
  128.  
  129. class
  130. {
  131.     name = "server";
  132.     ping_time = 90 seconds;
  133.     ping_warning = 15 seconds;
  134.     connectfreq = 15 minutes;
  135.     max_number = 1;
  136.     sendq = 30 megabytes;
  137. };
  138.  
  139. listen
  140. {
  141.    
  142.     flags = hidden, ssl;
  143.     host = "$BindIP";
  144.     port = 6697,9999;
  145.  
  146. };
  147.  
  148. listen
  149. {
  150.    
  151.     flags = hidden;
  152.     host = "$BindIP";
  153.     port = 6667,4400;
  154.  
  155. };
  156.  
  157. auth
  158. {
  159.     user = "$MyIP";
  160.     user = "$MyHost";
  161.     spoof = "$MySpoof";
  162.     class = "opers";
  163.     flags = spoof_notice, exceed_limit, kline_exempt,
  164.         gline_exempt, resv_exempt, no_tilde, can_flood, can_idle;
  165. };
  166.  
  167. auth
  168. {
  169.     user = "*@*";
  170.     class = "users";
  171. };
  172.  
  173. operator
  174. {
  175.     name = "$MyNick";
  176.     user = "$MySpoof";
  177.     password = "$MyPassword";
  178.     encrypted = yes;
  179.     class = "opers";
  180.     umodes = locops, servnotice, operwall, wallop, bots, cconn, cconn_full, debug, full, skill, nchange, rej, unauth, external, spy, operwall;
  181.     flags = global_kill, remote, kline, unkline, xline,
  182.         die, rehash, nick_changes, admin, operwall, gline, oper_spy;
  183. };
  184.  
  185.  
  186. cluster
  187. {
  188.     name = "*.$NetAddress";
  189.     type = all;
  190. };
  191.  
  192. shared
  193. {
  194.  
  195.     name = "$Services";
  196.     type = all, services;
  197. };
  198.  
  199. exempt
  200. {
  201.     ip = "$MyIP";
  202. };
  203.  
  204. resv
  205. {
  206.     reason = "Reserved for services/staff";
  207.     nick = "nickserv";
  208.     nick = "chanserv";
  209.     nick = "operserv";
  210.     nick = "memoserv";
  211.     nick = "botserv";
  212.     nick = "Global";
  213.     nick = "JUPES";
  214.     nick = "JUPE";
  215.     nick = "CH?NF?X";
  216.     nick = "oper";
  217.     nick = "ircop";
  218.     nick = "op";
  219.     nick = "ident";
  220.     nick = "pass";
  221.     reason = "Clone bots";
  222.     nick = "clone*";
  223. };
  224.  
  225. channel
  226. {
  227.     regex_bans = yes;
  228.     cycle_on_hostchange = yes;
  229.     disable_fake_channels = yes;
  230.     restrict_channels = no;
  231.     disable_local_channels = yes;
  232.     use_invex = yes;
  233.     use_except = yes;
  234.     use_knock = yes;
  235.     knock_delay = 1 minutes;
  236.     knock_delay_channel = 1 minute;
  237.     burst_topicwho = yes;
  238.     max_chans_per_user = 25;
  239.     quiet_on_ban = yes;
  240.     max_bans = 100;
  241.     join_flood_count = 16;
  242.     join_flood_time = 8 seconds;
  243.     default_split_user_count = 20000;
  244.     default_split_server_count = 15;
  245.     no_create_on_split = no;
  246.     no_join_on_split = no;
  247. };
  248.  
  249. serverhide
  250. {
  251.     flatten_links = yes;
  252.     links_delay = 5 minutes;
  253.     hidden = yes;
  254.     disable_hidden = no;
  255.     hide_servers = yes;
  256.     hidden_name = "*.$NetName";
  257.     hide_server_ips = yes;
  258. };
  259.  
  260. general
  261. {
  262.     cloak_key1 = "$Cloak1";
  263.     cloak_key2 = "$Cloak2";
  264.     cloak_key3 = "$Cloak3";
  265.     services_name = "$Services";
  266.     gline_min_cidr = 16;
  267.     gline_min_cidr6 = 48;
  268.     invisible_on_connect = yes;
  269.     burst_away = no;
  270.     use_whois_actually = yes;
  271.     kill_chase_time_limit = 90;
  272.     hide_spoof_ips = yes;
  273.     hide_killer = no;
  274.     ignore_bogus_ts = no;
  275.     disable_auth = no;
  276.     disable_remote_commands = yes;
  277.     tkline_expire_notices = no;
  278.     default_floodcount = 10;
  279.     failed_oper_notice = yes;
  280.     dots_in_ident = 0;
  281.     dot_in_ip6_addr = no;
  282.     min_nonwildcard = 3;
  283.     min_nonwildcard_simple = 3;
  284.     max_accept = 20;
  285.     anti_nick_flood = yes;
  286.     max_nick_time = 20 seconds;
  287.     max_nick_changes = 5;
  288.     anti_spam_exit_message_time = 5 minutes;
  289.     anti_spam_connect_numeric = yes;
  290.     ts_warn_delta = 30 seconds;
  291.     ts_max_delta = 5 minutes;
  292.     kline_with_reason = yes;
  293.     kline_reason = "Connection closed";
  294.     reject_hold_time = 30 seconds;
  295.     warn_no_nline = yes;
  296.     stats_e_disabled = yes;
  297.     stats_o_oper_only = yes;
  298.     stats_P_oper_only = yes;
  299.     stats_i_oper_only = yes;
  300.     stats_k_oper_only = yes;
  301.     caller_id_wait = 1 minute;
  302.     opers_bypass_callerid = no;
  303.     pace_wait_simple = 1 second;
  304.     pace_wait = 10 seconds;
  305.     short_motd = no;
  306.     ping_cookie = no;
  307.     no_oper_flood = yes;
  308.     true_no_oper_flood = yes;
  309.     oper_pass_resv = yes;
  310.     idletime = 0;
  311.     max_targets = 4;
  312.     client_flood = 2560 bytes;
  313.     message_locale = "standard";
  314.     oper_only_umodes = bots, cconn, cconn_full, debug, full, skill,
  315.         nchange, rej, spy, external, operwall, locops, unauth, hidechannels;
  316.     oper_umodes = bots, locops, servnotice, operwall, wallop, external;
  317.     throttle_time = 0;
  318. };
  319.  
  320. glines
  321. {
  322.     enable = yes;
  323.     duration = 1 day;
  324.     logging = reject, block;
  325.     user = "I.still.hate.packets";
  326.     name = "hades.arpa";
  327.     action = reject, block;
  328.     user = "god@*";
  329.     name = "*";
  330.     action = block;
  331. };
  332.  
  333. modules
  334. {
  335.     path = "ircd/modules";
  336.     path = "ircd/modules/autoload";
  337.         module = "m_samode.so";
  338.         module = "m_spoof.so";
  339.         module = "m_clearchan.so";
  340.         module = "spy_info_notice.so";
  341.         module = "spy_links_notice.so";
  342.         module = "spy_motd_notice.so";
  343.         module = "spy_stats_notice.so";
  344.         module = "spy_stats_p_notice.so";
  345.         module = "spy_trace_notice.so";
  346.         module = "spy_whois_notice.so";
  347.         module = "m_mkpasswd.so";
  348.         module = "m_killhost.so";
  349. };
  350. );
  351. open (IRCDCONF, '>>ircd.conf');
  352. print IRCDCONF $config;
  353. close (IRCDCONF);
  354. print "Your config file has been generated. You may start the IRCd and oper up with /oper $MyNick $MyPassword\n";
  355. exit;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top