├── RemoveToPorts ├── README.md └── RemoveToPorts.rsc ├── LTE └── SMSCommands │ ├── README.md │ └── SMSCommands.rsc ├── README.md ├── OpenVPN ├── README.md ├── OpenVPN.rsc └── MikroTikVPN.ovpn ├── DownloadAPPackages ├── README.md └── DownloadAPPackages.rsc ├── Logging ├── README.md └── ClearLog.rsc ├── Findstatic ├── README.md └── Findstatic.rsc ├── AutoUpdate ├── README.md └── AutoUpdate.rsc ├── AutoBackup ├── README.md └── AutoBackup.rsc ├── Funny ├── WirelessBeep.md ├── WirelessBeep.rsc ├── Music │ ├── coolsound1 │ ├── sirensound │ ├── Miklavcic Victory.rsc │ ├── StarWars.rsc │ ├── SuperMario Underworld.rsc │ ├── Jurassic Park.rsc │ ├── Final Countdown.rsc │ └── SuperMario.rsc └── Westminster.rsc ├── HairpinNAT ├── README.md └── HairPinNatGenerator.rsc ├── Unimus ├── randomstring.php ├── README.md └── user.rsc ├── OpenDNSUpdater ├── README.md └── OpenDNSUpdater.rsc ├── QoS ├── CellPhoneAddressList.rsc └── README.md ├── DDNS ├── No-IP_Updater_DoubleNAT.rsc ├── No-IP_Updater.rsc └── FreeDNS-Updater.rsc ├── Management ├── SetIdentityAndPasswordOnNeighbors.rsc ├── CAPsMAN.rsc └── AddMissingVlans1a.rsc ├── Tunnels ├── GRE Site to site (DDNS).rsc └── UpdateTunnelsFromComments.rsc ├── ConditionalDNSForward ├── README.md └── ConditionalDNSForward.rsc ├── NestedAddressLists.rsc └── LICENSE /RemoveToPorts/README.md: -------------------------------------------------------------------------------- 1 | # Remove To Ports 2 | Will scan through your NAT table and remove redundant to-ports configuration. 3 | -------------------------------------------------------------------------------- /LTE/SMSCommands/README.md: -------------------------------------------------------------------------------- 1 | # SMSCommands 2 | Can be useful to run commands from SMS on MikroTik devices. 3 | 4 | Run with scheduler every N time. 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ROS Scripts 2 | Scripts for RouterOS (MikroTik devices) 3 | 4 | Pullrequests and other kinds of script submissions are appreciated and will be looked at. 5 | -------------------------------------------------------------------------------- /OpenVPN/README.md: -------------------------------------------------------------------------------- 1 | Important: Change the domain name in the script 2 | Download the CA (script generates and exports it) and bundle it with the openvpn config file 3 | 4 | Enjoy 5 | -------------------------------------------------------------------------------- /DownloadAPPackages/README.md: -------------------------------------------------------------------------------- 1 | # DownloadAPPackages 2 | This script will keep the latest version of some routeros packages in a folder, useful to make capsman auto upgrade access points. 3 | -------------------------------------------------------------------------------- /Logging/README.md: -------------------------------------------------------------------------------- 1 | # ClearLog 2 | Snippet to clear log of a MikroTik, can be useful when you've made changes deprecating all old log data and don't want to be confised, or whatever you wanna do. 3 | -------------------------------------------------------------------------------- /Findstatic/README.md: -------------------------------------------------------------------------------- 1 | # Findstatic 2 | 3 | Script to find all IP addresses from ARP that aren't in DHCP. 4 | 5 | Put script inside a "MikroTik script" and run with 6 | ``` 7 | /system script run SCRIPTNAME 8 | ``` 9 | -------------------------------------------------------------------------------- /AutoUpdate/README.md: -------------------------------------------------------------------------------- 1 | Let's be honest, this is not for production, even though I'd say the stable releases works rather well. 2 | 3 | I'm running this at home on all my gear, and on the testing branch. Btw i use arch 4 | -------------------------------------------------------------------------------- /AutoBackup/README.md: -------------------------------------------------------------------------------- 1 | # AutoBackup 2 | 3 | ## Function 4 | The function of this script is to backup MikroTik RouterOS config to FTP 5 | 6 | ## Notes 7 | This script should be tested and verified after every RouterOS update installed. 8 | -------------------------------------------------------------------------------- /Funny/WirelessBeep.md: -------------------------------------------------------------------------------- 1 | # WirelessBeep 2 | 3 | ## Function 4 | The function of this script is to make an upwards sound when someone connects to wifi, and a downwards sound when someone disconnects. 5 | 6 | ## Notes 7 | This script should be run once every second for best effect. -------------------------------------------------------------------------------- /Logging/ClearLog.rsc: -------------------------------------------------------------------------------- 1 | foreach i in=[/system logging action find] do={ 2 | :do { 3 | :local data [/system logging action get $i]; 4 | /system logging action set $i memory-lines=1; 5 | /system logging action set $i memory-lines=($data->"memory-lines") 6 | } on-error={} 7 | } 8 | -------------------------------------------------------------------------------- /HairpinNAT/README.md: -------------------------------------------------------------------------------- 1 | This script is really easy to use, just run it and it'll make hairpin nats that only hairpin when needed automagically. 2 | 3 | Since this uses mangle you'll likely have to disable Fasttrack, i usually keep the rule but set src and dst ip to 0.0.0.0 just to keep the standard ruleset intact on SMB gateways. 4 | -------------------------------------------------------------------------------- /RemoveToPorts/RemoveToPorts.rsc: -------------------------------------------------------------------------------- 1 | foreach i in=[/ip firewall nat find] do={ 2 | :local obj ([/ip firewall nat print as-value where .id=$i]->0); 3 | :if ([:len ($obj->"dst-port")] > 0 && ($obj->"dst-port") = ($obj->"to-ports")) do={ 4 | :put "Removed To Ports for $($obj->"comment")" 5 | /ip firewall nat unset $i to-ports 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Unimus/randomstring.php: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /OpenDNSUpdater/README.md: -------------------------------------------------------------------------------- 1 | # OpenDNS updater 2 | 3 | Since the one on OpenDNS wiki page recommends downloading to file, which will ruin the onboard flash if ran often enough, I've decided to write and publish this one, we use amazons checkip service, because then we don't get api throttled by OpenDNS webservice and don't have to add ugly delays in the script. 4 | -------------------------------------------------------------------------------- /AutoUpdate/AutoUpdate.rsc: -------------------------------------------------------------------------------- 1 | :do { 2 | :local versioninfo [/system package update check-for-updates as-value] 3 | 4 | :if (($versioninfo->"installed-version") != ($versioninfo->"latest-version")) do={ 5 | /log error ("Found new version " . ($versioninfo->"latest-version") . " installing now!") 6 | /system package update download 7 | :delay 5s 8 | /system reboot 9 | } 10 | } on-error={ 11 | /log error "AutoUpdate script errored out, please check" 12 | } 13 | -------------------------------------------------------------------------------- /LTE/SMSCommands/SMSCommands.rsc: -------------------------------------------------------------------------------- 1 | # Secret to put in sms to execute commands 2 | :local secret "smssecret" 3 | 4 | # Command table 5 | :local commands { "reboot"="/system reboot" } 6 | 7 | foreach i in=[/tool sms inbox find] do={ 8 | :local sms [/tool sms inbox get $i] 9 | 10 | :foreach k,v in=$commands do={ 11 | if (([:len ([:find ($sms->"message") $k -1]) ] > 0) && ([:len ([:find ($sms->"message") $secret -1]) ] > 0)) do={ 12 | :local func [:parse $v] 13 | $func 14 | } 15 | } 16 | /tool sms inbox remove $i 17 | } 18 | -------------------------------------------------------------------------------- /QoS/CellPhoneAddressList.rsc: -------------------------------------------------------------------------------- 1 | :foreach i in=[/ip dhcp-server lease find] do={ 2 | :local hostname [/ip dhcp-server lease get $i host-name] 3 | 4 | :if ($hostname~"ipad|iPad|android|Android|iphone|iPhone") do={ 5 | :local ipaddr [/ip dhcp-server lease get $i address] 6 | :local expire [/ip dhcp-server lease get $i expires-after] 7 | 8 | :local exists [:len [/ip firewall address-list find list=CellPhones address=$ipaddr]] 9 | if ($exists = 0) do={ 10 | /ip firewall address-list add address=$ipaddr list=CellPhones timeout=$expire 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Funny/WirelessBeep.rsc: -------------------------------------------------------------------------------- 1 | :global ConnCount0 2 | 3 | :if ([:typeof $ConnCount0] = "nothing") do={ 4 | :set ConnCount0 0 5 | } 6 | 7 | :local ConnCount1 0 8 | :foreach i in=[/interface wireless registration-table find] do={ :set ConnCount1 ($ConnCount1 + 1) } 9 | 10 | :if ($ConnCount0 < $ConnCount1) do={ 11 | :for i from=800 to=2000 step=100 do={ 12 | :beep frequency=$i length=11ms; 13 | :delay 11ms; 14 | } 15 | } 16 | :if ($ConnCount1 < $ConnCount0) do={ 17 | :for i from=2000 to=50 step=-100 do={ 18 | :beep frequency=$i length=11ms; 19 | :delay 11ms; 20 | } 21 | } 22 | 23 | :set ConnCount0 $ConnCount1 -------------------------------------------------------------------------------- /QoS/README.md: -------------------------------------------------------------------------------- 1 | # CellPhoneAddressList 2 | 3 | ## Function 4 | The function of this script is to create an address list with local IP addresses of "all"(most) mobile devices, so they can be queued separately from regular devices. Which can be good to prevent smartphone users from unintentionally killing the network by syncing data with iCloud/Google Photos etc... 5 | 6 | 7 | ## Notes 8 | This script should be run once every second for best effect. (Once every few seconds is ok too). 9 | 10 | This script is not meant to prevent malicious users from overloading the network, but rather prevent unintentional DoS from employees who connect their phones to WiFi. 11 | -------------------------------------------------------------------------------- /Funny/Music/coolsound1: -------------------------------------------------------------------------------- 1 | :beep frequency=600 length=165ms; 2 | :delay 165ms; 3 | 4 | :beep frequency=50 length=83ms; 5 | :delay 83ms; 6 | 7 | :beep frequency=600 length=165ms; 8 | :delay 165ms; 9 | 10 | :beep frequency=50 length=83ms; 11 | :delay 83ms; 12 | 13 | :beep frequency=650 length=165ms; 14 | :delay 165ms; 15 | 16 | :beep frequency=600 length=165ms; 17 | :delay 165ms; 18 | 19 | :beep frequency=50 length=83ms; 20 | :delay 83ms; 21 | 22 | :beep frequency=600 length=165ms; 23 | :delay 165ms; 24 | 25 | :beep frequency=700 length=275ms; 26 | :delay 275ms; 27 | 28 | :beep frequency=800 length=275ms; 29 | :delay 275ms; 30 | 31 | :beep frequency=900 length=110ms; 32 | :delay 110ms; 33 | -------------------------------------------------------------------------------- /DDNS/No-IP_Updater_DoubleNAT.rsc: -------------------------------------------------------------------------------- 1 | ##############Script Settings################## 2 | 3 | :local NOIPUser "user" 4 | :local NOIPPass "pass" 5 | :local NOIPDomain "domain" 6 | 7 | ############################################### 8 | #http://checkip.amazonaws.com/ 9 | #http://myip.dnsomatic.com/ 10 | #http://ipecho.net/plain 11 | 12 | /tool fetch url="http://myip.dnsomatic.com/" mode=http dst-path=mypublicip.txt 13 | :local IpCurrent [file get mypublicip.txt contents ] 14 | 15 | :if ([:resolve $NOIPDomain] != $IpCurrent) do={ 16 | /tool fetch mode=http user=$NOIPUser password=$NOIPPass url="http://dynupdate.no-ip.com/nic/update\3Fhostname=$NOIPDomain&myip=$IpCurrent" keep-result=no 17 | :log info "NO-IP Update: $NOIPDomain - $IpCurrent" 18 | } 19 | -------------------------------------------------------------------------------- /DDNS/No-IP_Updater.rsc: -------------------------------------------------------------------------------- 1 | ##############Script Settings################## 2 | 3 | :local NOIPUser "user" 4 | :local NOIPPass "pass" 5 | :local NOIPDomain "domain" 6 | :local WANInter "ether1-gateway" 7 | 8 | ########################################## 9 | 10 | :local IpCurrent [/ip address get [find interface=$WANInter] address]; 11 | :for i from=( [:len $IpCurrent] - 1) to=0 do={ 12 | :if ( [:pick $IpCurrent $i] = "/") do={ 13 | :local NewIP [:pick $IpCurrent 0 $i]; 14 | :if ([:resolve $NOIPDomain] != $NewIP) do={ 15 | /tool fetch mode=http user=$NOIPUser password=$NOIPPass url="http://dynupdate.no-ip.com/nic/update\3Fhostname=$NOIPDomain&myip=$NewIP" keep-result=no 16 | :log info "NO-IP Update: $NOIPDomain - $NewIP" 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /OpenDNSUpdater/OpenDNSUpdater.rsc: -------------------------------------------------------------------------------- 1 | :local odnsusername "username" 2 | :local odnspassword "password" 3 | :local odnshostname "label" 4 | 5 | # Do not edit below here 6 | 7 | :global lastip 8 | 9 | :local curip ([/tool fetch url="https://checkip.amazonaws.com/" mode=http output=user as-value]->"data") 10 | 11 | if ($lastip != $curip) do={ 12 | :local response ([/tool fetch url="https://updates.opendns.com/nic/update\3Fhostname=$odnshostname" user=$odnsusername password=$odnspassword mode=http output=user as-value]->"data") 13 | /log error "Updated OpenDNS public IP, response was: $response" 14 | :if ([:len [:find $response "good" -1]] > 0) do={ 15 | :set $lastip $curip 16 | } else={ 17 | /system script environment remove [find where name=lastip] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Funny/Music/sirensound: -------------------------------------------------------------------------------- 1 | :beep frequency=550 length=494ms; 2 | :delay 494ms; 3 | :beep frequency=400 length=494ms; 4 | :delay 494ms; 5 | :beep frequency=550 length=494ms; 6 | :delay 494ms; 7 | :beep frequency=400 length=494ms; 8 | :delay 494ms; 9 | :beep frequency=550 length=494ms; 10 | :delay 494ms; 11 | :beep frequency=400 length=494ms; 12 | :delay 494ms; 13 | :beep frequency=550 length=494ms; 14 | :delay 494ms; 15 | :beep frequency=400 length=494ms; 16 | :delay 494ms; 17 | :beep frequency=550 length=494ms; 18 | :delay 494ms; 19 | :beep frequency=400 length=494ms; 20 | :delay 494ms; 21 | :beep frequency=550 length=494ms; 22 | :delay 494ms; 23 | :beep frequency=400 length=494ms; 24 | :delay 494ms; 25 | :beep frequency=550 length=494ms; 26 | :delay 494ms; 27 | :beep frequency=400 length=494ms; 28 | :delay 494ms; 29 | -------------------------------------------------------------------------------- /DownloadAPPackages/DownloadAPPackages.rsc: -------------------------------------------------------------------------------- 1 | :local architectures { "mipsbe" ; "arm" } 2 | :local subfolder "caps" 3 | 4 | foreach arch in=[$architectures] do={ 5 | :local installedver [/system package update get installed-version] 6 | :local dlurl "https://download.mikrotik.com/routeros/$installedver/routeros-$arch-$installedver.npk" 7 | 8 | foreach i in=[/file find type="package" && package-version!=$installedver] do={ 9 | /log error "Removing old $arch package $[/file get $i package-version]" 10 | /file remove $i 11 | } 12 | 13 | :local filename "$subfolder/routeros-$arch-$installedver" 14 | 15 | if ([:len [/file find where name=$filename]] = 0) do={ 16 | /log error "Downloading new $arch package $installedver" 17 | /tool fetch url=$dlurl dst-path=$filename 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Unimus/README.md: -------------------------------------------------------------------------------- 1 | # Deploying unimus with safe ssh authentication 2 | A quick 'n dirty on deploying unimus with ssh keyauth instead of dirty password auth 3 | 4 | 1. Run ssh-keygen 5 | 2. Choose where to save pub and privkey 6 | 3. Upload pubkey to a https:// host, preferably one that runs php too for randomstring.php [1] 7 | 4. Upload privkey to unimus 8 | 5. Run script on every single MikroTik device you wanna join to Unimus [2] 9 | 10 | 11 | 1: Since MikroTik doesn't support disabling password authentication for users we genrate a long random password that we don't save anywhere and never see again 12 | 13 | 2: You should also edit the script to add a firewall rule that allows input traffic on port 22, I didn't add this here because you might want to limit the firewall rule to an address-list that you've already got deployed or something like that, your own responsibility. 14 | 15 | -------------------------------------------------------------------------------- /Management/SetIdentityAndPasswordOnNeighbors.rsc: -------------------------------------------------------------------------------- 1 | # This script will set a password and identity on all accesspoints it can connect to 2 | # Intended for when you put up many capsman managed aps and want to secure them in one go. 3 | # The identity part can be commented or removed if not needed 4 | # Script will only work once, when there's no password on the AP 5 | 6 | { 7 | :local Password "Coolpassword192" 8 | 9 | :local Counter 0 10 | :foreach neighbor in=[/ip neighbor find] do={ 11 | :local Platform [/ip neighbor get $neighbor platform] 12 | :local IP [/ip neighbor get $neighbor address4] 13 | 14 | if ($Platform = "MikroTik") do={ 15 | :local Identity "AP$Counter" 16 | /system ssh address=$IP user=admin command="/system identity set name=$Identity" 17 | /system ssh address=$IP user=admin command="/user set admin Password=$Password" 18 | } 19 | :set Counter ($Counter + 1) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Tunnels/GRE Site to site (DDNS).rsc: -------------------------------------------------------------------------------- 1 | ##############Script Settings################## 2 | 3 | :local LocalAddr "local.tld" 4 | :local RemoteAddr "remote.tld" 5 | :local Interface "DynamicTunnel1" 6 | 7 | ########################################## 8 | 9 | :local NewLocalAddr [:resolve $LocalAddr] 10 | :local NewRemoteAddr [:resolve $RemoteAddr] 11 | 12 | :local OldLocalAddr [/interface gre get [find name=$Interface ] local-address] 13 | :local OldRemoteAddr [/interface gre get [find name=$Interface ] remote-address] 14 | 15 | if ($NewLocalAddr != $OldLocalAddr) do={ 16 | /interface gre set [find name=$Interface] local-address=$NewLocalAddr 17 | /log info "Local tunnel IP for $Interface has changed from $OldLocalAddr to $NewLocalAddr" 18 | } 19 | 20 | if ($NewRemoteAddr != $OldRemoteAddr) do={ 21 | /interface gre set [find name=$Interface] remote-address=$NewRemoteAddr 22 | /log info "Remote tunnel IP for $Interface has changed from $OldRemoteAddr to $NewRemoteAddr" 23 | } 24 | -------------------------------------------------------------------------------- /ConditionalDNSForward/README.md: -------------------------------------------------------------------------------- 1 | You'll need these rules to make the failover script to work 2 | 3 | The script is only required if you've got several internal DNS servers and you want to failover between them if they go down. 4 | 5 | The script will remove stale entries too, relies on arecords existing with the root domain pointing to the dns servers (Like Microsoft Active Directory) 6 | 7 | ``` 8 | /ip firewall mangle 9 | add action=mark-connection chain=prerouting connection-mark=no-mark dst-port=53 layer7-protocol=domaintoforward \ 10 | new-connection-mark=domaintoforward passthrough=yes protocol=tcp 11 | add action=mark-connection chain=prerouting connection-mark=no-mark dst-port=53 layer7-protocol=domaintoforward \ 12 | new-connection-mark=domaintoforward passthrough=yes protocol=udp 13 | 14 | /ip firewall nat 15 | add action=dst-nat chain=dstnat comment=central.dialect.se connection-mark=domaintoforward to-addresses=adnsserver 16 | add action=masquerade chain=srcnat connection-mark=domaintoforward 17 | 18 | /ip firewall layer7-protocol 19 | add name=domaintoforward regexp=domaintoforward 20 | ``` 21 | -------------------------------------------------------------------------------- /Funny/Music/Miklavcic Victory.rsc: -------------------------------------------------------------------------------- 1 | :beep frequency=523 length=200ms; 2 | :delay 1000ms; 3 | 4 | :beep frequency=523 length=200ms; 5 | :delay 1000ms; 6 | 7 | :beep frequency=523 length=200ms; 8 | :delay 1000ms; 9 | 10 | :beep frequency=659 length=700ms; 11 | :delay 700ms; 12 | 13 | :beep frequency=784 length=500ms; 14 | :delay 500ms; 15 | 16 | :beep frequency=523 length=200ms; 17 | :delay 1000ms; 18 | 19 | :beep frequency=523 length=200ms; 20 | :delay 1000ms; 21 | 22 | :beep frequency=523 length=200ms; 23 | :delay 1000ms; 24 | 25 | :beep frequency=659 length=700ms; 26 | :delay 700ms; 27 | 28 | :beep frequency=784 length=500ms; 29 | :delay 800ms; 30 | 31 | :beep frequency=784 length=400ms; 32 | :delay 400ms; 33 | 34 | :beep frequency=884 length=200ms; 35 | :delay 200ms; 36 | 37 | :beep frequency=784 length=200ms; 38 | :delay 200ms; 39 | 40 | :beep frequency=687 length=200ms; 41 | :delay 200ms; 42 | 43 | :beep frequency=659 length=200ms; 44 | :delay 200ms; 45 | 46 | :beep frequency=579 length=200ms; 47 | :delay 200ms; 48 | 49 | :beep frequency=519 length=400ms; 50 | :delay 400ms; -------------------------------------------------------------------------------- /Funny/Music/StarWars.rsc: -------------------------------------------------------------------------------- 1 | :beep frequency=500 length=500ms; 2 | :delay 500ms; 3 | 4 | :beep frequency=500 length=500ms; 5 | :delay 500ms; 6 | 7 | :beep frequency=500 length=500ms; 8 | :delay 500ms; 9 | 10 | :beep frequency=400 length=500ms; 11 | :delay 400ms; 12 | 13 | :beep frequency=600 length=200ms; 14 | :delay 100ms; 15 | 16 | :beep frequency=500 length=500ms; 17 | :delay 500ms; 18 | 19 | :beep frequency=400 length=500ms; 20 | :delay 400ms; 21 | 22 | :beep frequency=600 length=200ms; 23 | :delay 100ms; 24 | 25 | :beep frequency=500 length=500ms; 26 | :delay 1000ms; 27 | 28 | 29 | 30 | :beep frequency=750 length=500ms; 31 | :delay 500ms; 32 | 33 | :beep frequency=750 length=500ms; 34 | :delay 500ms; 35 | 36 | :beep frequency=750 length=500ms; 37 | :delay 500ms; 38 | 39 | :beep frequency=810 length=500ms; 40 | :delay 400ms; 41 | 42 | :beep frequency=600 length=200ms; 43 | :delay 100ms; 44 | 45 | :beep frequency=470 length=500ms; 46 | :delay 500ms; 47 | 48 | :beep frequency=400 length=500ms; 49 | :delay 400ms; 50 | 51 | :beep frequency=600 length=200ms; 52 | :delay 100ms; 53 | 54 | :beep frequency=500 length=500ms; 55 | :delay 1000ms; -------------------------------------------------------------------------------- /NestedAddressLists.rsc: -------------------------------------------------------------------------------- 1 | :local dynamictimeout 20 2 | 3 | :local addedentry true 4 | :while ($addedentry) do={ 5 | :set addedentry false 6 | :foreach i in=[/ip firewall address-list find] do={ 7 | :local tlist [/ip firewall address-list get $i list] 8 | :local taddr [/ip firewall address-list get $i address] 9 | 10 | foreach j in [/ip firewall address-list find where list=$taddr] do={ 11 | :local dynaddress [/ip firewall address-list get $j address] 12 | :local comment [/ip firewall address-list get $j comment] 13 | :local parentdisabled false 14 | 15 | :do { 16 | :set parentdisabled [/ip firewall address-list get [:toid $comment] disabled] 17 | } on-error { } 18 | 19 | if (!$parentdisabled) do={ 20 | :local existingentry [/ip firewall address-list find where list=$tlist and address=$dynaddress] 21 | 22 | :if ([:len $existingentry] > 0) do={ 23 | :if ([/ip firewall address-list get $existingentry dynamic]) do={ 24 | /ip firewall address-list set $existingentry timeout=$dynamictimeout 25 | } 26 | } else={ 27 | /ip firewall address-list add list=$tlist address=$dynaddress timeout=$dynamictimeout comment=[:tostr $i] 28 | :set addedentry true 29 | } 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Management/CAPsMAN.rsc: -------------------------------------------------------------------------------- 1 | #CAPsMAN 2 | if ([/interface bridge get 0 name] != "") do={ 3 | /caps-man channel add control-channel-width=20mhz extension-channel=disabled name=channel reselect-interval=1h skip-dfs-channels=yes save-selected=yes 4 | /caps-man datapath add bridge=[/interface bridge get 0 name] client-to-client-forwarding=yes name=datapath 5 | /caps-man security add authentication-types=wpa2-psk encryption=aes-ccm group-encryption=aes-ccm name=security1 passphrase=password123 6 | /caps-man configuration add channel=channel country=sweden datapath=datapath distance=indoors name=cfg1 security=security1 ssid=WiFi2 7 | /caps-man configuration add channel=channel country=sweden datapath=datapath distance=indoors name=cfg2 security=security1 ssid=WiFi5 8 | /caps-man access-list add action=accept interface=all signal-range=-90..120 9 | /caps-man access-list add action=reject disabled=no interface=all ssid-regexp="" 10 | /caps-man manager set enabled=yes 11 | /caps-man manager set upgrade-policy=suggest-same-version 12 | /caps-man provisioning add action=create-dynamic-enabled hw-supported-modes=gn master-configuration=cfg1 name-format=prefix-identity name-prefix=cfg1 13 | /caps-man provisioning add action=create-dynamic-enabled hw-supported-modes=ac master-configuration=cfg2 name-format=prefix-identity name-prefix=cfg2 14 | 15 | /ip firewall filter add action=accept chain=input comment="CAPs to CAPsMAN" dst-port=5246,5247 protocol=udp src-address=127.0.0.1 place-before=1 16 | } 17 | -------------------------------------------------------------------------------- /Findstatic/Findstatic.rsc: -------------------------------------------------------------------------------- 1 | { 2 | # Only include subnets from this array, probably never have to touch unless you already know what you're doing 3 | :local RFC1918 { "10.0.0.0/8";"172.16.0.0/12";"192.168.0.0/16" } 4 | # We only generate hairpins for subnets below /30 5 | :local subnetsbelow 255.255.255.252 6 | 7 | :local info [:toarray ""] 8 | :local ctr 0 9 | 10 | foreach i in=[/ip address find] do={ 11 | :local curnet [/ip address get $i] 12 | 13 | :local inRFC1918 $false 14 | foreach j in=$RFC1918 do={ 15 | :if (($curnet->"network") in $j) do={ :set inRFC1918 true } 16 | } 17 | 18 | if (($curnet->"netmask") < $subnetsbelow && $inRFC1918) do={ 19 | # Fill the ARP 20 | /tool ip-scan address-range=($curnet->"address") interface=($curnet->"interface") duration=10 21 | 22 | /ip arp remove [find where !mac-address] 23 | # Check the ARP 24 | foreach k in=[/ip arp find where interface=($curnet->"interface")] do={ 25 | :local curarp [/ip arp get $k] 26 | 27 | # Show IP/MAC combos not in a DHCP lease 28 | if ([:len [($curarp->"mac-address")]] > 0 && [len [/ip dhcp-server lease find where mac-address=($curarp->"mac-address")]] <= 0) do={ 29 | #:put "IP $($curarp->"address") found with mac $($curarp->"mac-address"), not in DCHP" 30 | :set ($info->$ctr) "IP $($curarp->"address") found with mac $($curarp->"mac-address"), not in DCHP" 31 | #:put ($info->$ctr) 32 | :set ctr ($ctr + 1) 33 | } 34 | } 35 | } 36 | } 37 | 38 | foreach str in=$info do={ 39 | :put $str 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /OpenVPN/OpenVPN.rsc: -------------------------------------------------------------------------------- 1 | # Delays are needed because MikroTik is a bit stupid regarding certificate generation. 2 | { 3 | :local domainname "domainname.com" 4 | 5 | :delay 1s; /certificate add name=ca common-name=$domainname days-valid=3650 key-size=2048 key-usage=crl-sign,key-cert-sign 6 | :delay 1s; /certificate add name=server common-name=$domainname days-valid=3650 key-size=2048 key-usage=digital-signature,key-encipherment,tls-server 7 | :delay 1s; /certificate sign ca name=ca 8 | :delay 1s; /certificate sign server name=server ca=ca 9 | :delay 1s; /certificate export-certificate ca export-passphrase="" 10 | 11 | :delay 1s; /ip pool add name=ovpn ranges=10.128.128.2-10.128.128.253 12 | :delay 1s; /ppp profile add dns-server=10.128.128.1 interface-list=LAN local-address=10.128.128.1 name=ovpn remote-address=ovpn use-compression=no use-encryption=yes 13 | :delay 1s; /interface ovpn-server server set default-profile=ovpn certificate=server enabled=yes port=1194 auth=sha1 cipher=aes128 14 | :delay 1s; /ip firewall address-list add list=ovpn address=$domainname 15 | :delay 1s; /ip firewall filter add action=accept chain=input comment="accept openvpn" dst-address-list=ovpn dst-port=1194 protocol=tcp place-before=1 16 | :delay 1s; /ip firewall nat add action=dst-nat chain=dstnat comment="NAT port 53 for OpenVPN to port 1194" dst-address-list=ovpn dst-port=53 protocol=tcp to-ports=1194 disabled=yes 17 | :delay 1s; /ip firewall nat add action=dst-nat chain=dstnat comment="NAT port 80 for OpenVPN to port 1194" dst-address-list=ovpn dst-port=80 protocol=tcp to-ports=1194 disabled=yes 18 | :delay 1s; /ip firewall nat add action=dst-nat chain=dstnat comment="NAT port 443 for OpenVPN to port 1194" dst-address-list=ovpn dst-port=443 protocol=tcp to-ports=1194 disabled=yes 19 | } 20 | -------------------------------------------------------------------------------- /HairpinNAT/HairPinNatGenerator.rsc: -------------------------------------------------------------------------------- 1 | { 2 | # Only include subnets from this array, probably never have to touch unless you already know what you're doing 3 | :local RFC1918 {"10.0.0.0/8";"172.16.0.0/12";"192.168.0.0/16" } 4 | # We only generate hairpins for subnets below /30 5 | :local subnetsbelow 255.255.255.252 6 | 7 | # No touchy touchy below here unless you're h4xxorm0n1338l33txxXx 8 | :local netarray [:toarray ""] 9 | :local count 0 10 | 11 | /ip firewall mangle remove [find where comment="Autogenerated Hairpin NAT"] 12 | foreach i in=[/ip address find] do={ 13 | :set count [$count + 1] 14 | :local curnet [/ip address get $i] 15 | 16 | :local inRFC1918 $false 17 | 18 | foreach j in=$RFC1918 do={ 19 | :if (($curnet->"network") in $j) do={ :set inRFC1918 true } 20 | } 21 | 22 | :if ([:typeof [:find $netarray ($curnet->"network") -1]] = "nil" && ($curnet->"netmask") < $subnetsbelow && $inRFC1918) do={ 23 | :set $netarray ($netarray, ($curnet->"network")) 24 | 25 | /ip firewall mangle add \ 26 | chain=forward \ 27 | connection-state=new \ 28 | connection-nat-state=dstnat \ 29 | src-address="$($curnet->"network")/$($curnet->"netmask")" \ 30 | dst-address="$($curnet->"network")/$($curnet->"netmask")" \ 31 | action=mark-connection \ 32 | new-connection-mark=HAIRPIN \ 33 | comment="Autogenerated Hairpin NAT" 34 | } 35 | } 36 | 37 | /ip firewall nat remove [find where comment="Autogenerated Hairpin NAT"] 38 | /ip firewall nat add action=masquerade chain=srcnat comment="Autogenerated Hairpin NAT" connection-mark=HAIRPIN ipsec-policy=out,none place-before=0 39 | } 40 | -------------------------------------------------------------------------------- /Management/AddMissingVlans1a.rsc: -------------------------------------------------------------------------------- 1 | ###This Script will auto create vlans that are missing 2 | ###Add the vlans you need to have in the newVlanArray variable by using "vlanid"="vlanName" and the script will do the rest 3 | ###BOF### 4 | ##Initialize variables 5 | 6 | :global "physInterface" bridge-local 7 | :global "newVlanArray" {"104"="104-CHCMGMT";"116"="116-security";"152"="152-userdata";"160"="160-printers";"168"="168-voice";"176"="176-wirelessi"} 8 | :global "oldVlanArray" [/interface vlan find] 9 | :global "COUNTER1" 0 10 | 11 | ##DO NOT CHANGE ANYTHING ELSE BELOW## 12 | ## 13 | ## 14 | #Functions 15 | 16 | #Create function to add all the vlans to the router 17 | 18 | :global "AddAllVlans" do={ 19 | :foreach k,v in=$newVlanArray do={/interface vlan add name=$v vlan-id=$k interface=$physInterface 20 | :put "VLAN $v has been added" 21 | } 22 | } 23 | 24 | 25 | ## 26 | #Create Function to add a single vlan 27 | :global "AddSingleVlan" do={ 28 | /interface vlan add name=$1 vlan-id=$2 interface=$physInterface 29 | 30 | ### 31 | 32 | #Check to see if there are any vlans on router. If not, add all vlans 33 | #If vlans exists, check to see if each one exists and create the ones that do not 34 | 35 | :if ([:len $oldVlanArray] = 0) do={ 36 | :put "No Vlans are on this router" 37 | $AddAllVlans 38 | :put "All New Vlans are now added" 39 | else={ 40 | :foreach k,v in=$newVlanArray do={ 41 | set COUNTER1 0 42 | :foreach item in=$oldVlanArray do={ 43 | :global oldvlanname [/interface vlan get value-name=name number=$item] 44 | :global oldvlanid [/interface vlan get value-name=vlan-id number=$item] 45 | :if ($oldvlanid !=$k) do={set COUNTER1 ($COUNTER1 +1)}} 46 | :if $COUNTER1 = ([:len $oldVlanArray]) do={$AddSingleVlan "$v" "$k"} 47 | } 48 | } 49 | ###EOF### 50 | -------------------------------------------------------------------------------- /ConditionalDNSForward/ConditionalDNSForward.rsc: -------------------------------------------------------------------------------- 1 | :local listname "domaintoforward" 2 | 3 | :local servercount [:len [/ip firewall address-list find where list=$listname]] 4 | :local onlinecount 0 5 | 6 | :foreach i in=[/ip firewall address-list find where list=$listname] do={ 7 | :local listip [/ip firewall address-list get $i address] 8 | :do { 9 | :local resolvedns [:resolve $listname server=$listip] 10 | :set onlinecount ($onlinecount + 1) 11 | 12 | :do { 13 | :set resolvedns [:resolve $listname server=$resolvedns] 14 | /ip firewall address-list add list=$listname address=$resolvedns 15 | } on-error={ } 16 | } on-error={ } 17 | } 18 | 19 | :if ($onlinecount = 0) do={ 20 | :put "All all listed DNS servers are offline, retry again when there are servers online." 21 | :error "Or add manually to address-list $listname." 22 | } 23 | 24 | :foreach i in=[/ip firewall address-list find where list=$listname] do={ 25 | :local listip [/ip firewall address-list get $i address] 26 | :do { 27 | :resolve $listname server=$listip 28 | :if ([/ip firewall address-list get $i dynamic]) do={ 29 | /ip firewall address-list remove $i 30 | /ip firewall address-list add list=$listname address=$listip 31 | } 32 | } on-error={ 33 | /ip firewall address-list set $i timeout=1w 34 | } 35 | } 36 | 37 | :local newdns ([/ip firewall address-list get ([find where list=$listname and dynamic=no]->0) address]) 38 | :local curdns [/ip firewall nat get ([find where comment=$listname]->0) to-addresses] 39 | 40 | :if ($curdns != $newdns) do={ 41 | :do { 42 | /ip firewall nat set ([find where comment=$listname]->0) to-addresses=$newdns 43 | } on-error={ 44 | :error "Can't find NAT rule with exact comment $listname" 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Unimus/user.rsc: -------------------------------------------------------------------------------- 1 | /system script remove Unimus 2 | 3 | /system script add name=Unimus owner=diadmin policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=":do { /file remove unimus.pub } on-error={}\r\ 4 | \n:do { /user remove unimus } on-error={}\r\ 5 | \n:do { /user group remove unimus } on-error={}\r\ 6 | \n:do {\r\ 7 | \n :put \"Fetching random string as password\"\r\ 8 | \n /tool fetch url=\"https://dialect.it/randomstring.php\?length=50\" dst-path=password.txt\r\ 9 | \n :delay delay-time=1s\r\ 10 | \n :local password [/file get password.txt contents ]\r\ 11 | \n /file remove password.txt\r\ 12 | \n :put \"Downloading pubkey\"\r\ 13 | \n /tool fetch url=\"https://dialect.it/unimus.pub\"\r\ 14 | \n :delay delay-time=1s\r\ 15 | \n :put \"Adding unimus group\"\r\ 16 | \n /user group add name=unimus policy=ssh,reboot,read,write,sensitive\r\ 17 | \n :put (\"Adding user unimus with password: \" . \$password)\r\ 18 | \n /user add name=unimus group=full password=\$password\r\ 19 | \n :delay delay-time=1s\r\ 20 | \n :put \"Importing SSH key (We don't want password authentication)\"\r\ 21 | \n /user ssh-keys import public-key-file=\"unimus.pub\" user=unimus\r\ 22 | \n :put \"Import finished without errors\"\r\ 23 | \n :put \"Adding access firewall rules\"\r\ 24 | \n /ip firewall address-list remove [/ip firewall address-list find where list=Safe !dynamic]\r\ 25 | \n /ip firewall address-list add address=management.dialect.it list=Safe\r\ 26 | \n /ip firewall filter remove [/ip firewall filter find where comment=\"Allow management from safe IP addresses\"]\r\ 27 | \n /ip firewall filter add action=accept chain=input comment=\"Allow management from safe IP addresses\" dst-port=22,8291 protocol=tcp src-address-list=Safe place-before=1\r\ 28 | \n} on-error={\r\ 29 | \n :do { /file remove \"unimus.pub\" } on-error={}\r\ 30 | \n :do { /user remove unimus } on-error={}\r\ 31 | \n :do { /user group remove unimus } on-error={}\r\ 32 | \n}\r\ 33 | \n" 34 | 35 | :delay delay-time=1s 36 | /system script run Unimus 37 | /system script remove Unimus 38 | -------------------------------------------------------------------------------- /AutoBackup/AutoBackup.rsc: -------------------------------------------------------------------------------- 1 | :local saveUserDB false 2 | :local saveSysBackup true 3 | :local encryptSysBackup false 4 | :local saveRawExport true 5 | :local verboseRawExport false 6 | 7 | :local FTPEnable true 8 | :local FTPServer "" 9 | :local FTPPort 21 10 | :local FTPUser "" 11 | :local FTPPass "" 12 | 13 | :local SMTPEnable true 14 | :local SMTPAddress "asdf@asdf.com" 15 | 16 | 17 | :local ts [/system clock get time] 18 | :set ts ([:pick $ts 0 2].[:pick $ts 3 5].[:pick $ts 6 8]) 19 | 20 | :local ds [/system clock get date] 21 | :set ds ([:pick $ds 7 11].[:pick $ds 0 3].[:pick $ds 4 6]) 22 | 23 | :local DNSName "" 24 | 25 | :do { 26 | :set DNSName ("-".[/ip cloud get dns-name]) 27 | } 28 | 29 | :local fname ("BACKUP-".[/system identity get name].$DNSName."-".$ds."-".$ts) 30 | 31 | :if ($saveUserDB) do={ 32 | /tool user-manager database save name=($fname.".umb") 33 | :log info message="User Manager DB Backup Finished" 34 | } 35 | 36 | :if ($saveSysBackup) do={ 37 | :if ($encryptSysBackup = true) do={ /system backup save name=($fname.".backup") } 38 | :if ($encryptSysBackup = false) do={ /system backup save dont-encrypt=yes name=($fname.".backup") } 39 | :log info message="System Backup Finished" 40 | } 41 | 42 | if ($saveRawExport) do={ 43 | :if ($verboseRawExport = true) do={ /export verbose file=($fname.".rsc") } 44 | :if ($verboseRawExport = false) do={ /export file=($fname.".rsc") } 45 | :log info message="Raw configuration script export Finished" 46 | } 47 | 48 | :delay 5s 49 | 50 | :local backupFileName "" 51 | 52 | :foreach backupFile in=[/file find] do={ 53 | :set backupFileName ([/file get $backupFile name]) 54 | :if ([:typeof [:find $backupFileName $fname]] != "nil") do={ 55 | if ($FTPEnable) do={ 56 | :log info "Uploading $backupFileName to FTP" 57 | /tool fetch address=$FTPServer port=$FTPPort src-path=$backupFileName user=$FTPUser password=$FTPPass dst-path=$backupFileName mode=ftp upload=yes 58 | } 59 | if ($SMTPEnable) do={ 60 | :log info "Uploading $backupFileName to SMTP" 61 | /tool e-mail send to=$SMTPAddress body="RouterOS Backup" subject="RouterOS Backup" file=$backupFileName 62 | } 63 | } 64 | } 65 | 66 | :delay 5s 67 | 68 | :foreach backupFile in=[/file find] do={ 69 | :if ([:typeof [:find [/file get $backupFile name] "BACKUP-"]]!= "nil") do={ 70 | /file remove $backupFile 71 | } 72 | } 73 | 74 | :log info message="Successfully removed Temporary Backup Files" 75 | :log info message="Automatic Backup Completed Successfully" 76 | -------------------------------------------------------------------------------- /Funny/Music/SuperMario Underworld.rsc: -------------------------------------------------------------------------------- 1 | :beep frequency=262 length=200ms; 2 | :delay 200ms; 3 | :beep frequency=523 length=200ms; 4 | :delay 200ms; 5 | :beep frequency=220 length=200ms; 6 | :delay 200ms; 7 | :beep frequency=440 length=200ms; 8 | :delay 200ms; 9 | :beep frequency=233 length=200ms; 10 | :delay 200ms; 11 | :beep frequency=466 length=200ms; 12 | :delay 200ms; 13 | :delay 1200ms; 14 | :beep frequency=262 length=200ms; 15 | :delay 200ms; 16 | :beep frequency=523 length=200ms; 17 | :delay 200ms; 18 | :beep frequency=220 length=200ms; 19 | :delay 200ms; 20 | :beep frequency=440 length=200ms; 21 | :delay 200ms; 22 | :beep frequency=233 length=200ms; 23 | :delay 200ms; 24 | :beep frequency=466 length=200ms; 25 | :delay 200ms; 26 | :delay 1200ms; 27 | :beep frequency=175 length=200ms; 28 | :delay 200ms; 29 | :beep frequency=349 length=200ms; 30 | :delay 200ms; 31 | :beep frequency=147 length=200ms; 32 | :delay 200ms; 33 | :beep frequency=294 length=200ms; 34 | :delay 200ms; 35 | :beep frequency=156 length=200ms; 36 | :delay 200ms; 37 | :beep frequency=311 length=200ms; 38 | :delay 200ms; 39 | :delay 1200ms; 40 | :beep frequency=175 length=200ms; 41 | :delay 200ms; 42 | :beep frequency=349 length=200ms; 43 | :delay 200ms; 44 | :beep frequency=147 length=200ms; 45 | :delay 200ms; 46 | :beep frequency=294 length=200ms; 47 | :delay 200ms; 48 | :beep frequency=156 length=200ms; 49 | :delay 200ms; 50 | :beep frequency=311 length=200ms; 51 | :delay 200ms; 52 | :delay 800ms; 53 | :beep frequency=311 length=133ms; 54 | :delay 133ms; 55 | :beep frequency=294 length=133ms; 56 | :delay 133ms; 57 | :beep frequency=277 length=133ms; 58 | :delay 133ms; 59 | :beep frequency=262 length=200ms; 60 | :delay 200ms; 61 | :delay 200ms; 62 | :beep frequency=311 length=200ms; 63 | :delay 200ms; 64 | :delay 200ms; 65 | :beep frequency=294 length=200ms; 66 | :delay 200ms; 67 | :delay 200ms; 68 | :beep frequency=208 length=200ms; 69 | :delay 200ms; 70 | :delay 200ms; 71 | :beep frequency=196 length=200ms; 72 | :delay 200ms; 73 | :delay 200ms; 74 | :beep frequency=277 length=200ms; 75 | :delay 200ms; 76 | :delay 200ms; 77 | :beep frequency=262 length=133ms; 78 | :delay 133ms; 79 | :beep frequency=370 length=133ms; 80 | :delay 133ms; 81 | :beep frequency=349 length=133ms; 82 | :delay 133ms; 83 | :beep frequency=330 length=133ms; 84 | :delay 133ms; 85 | :beep frequency=466 length=133ms; 86 | :delay 133ms; 87 | :beep frequency=440 length=133ms; 88 | :delay 133ms; 89 | :beep frequency=415 length=133ms; 90 | :delay 133ms; 91 | :delay 133ms; 92 | :beep frequency=311 length=133ms; 93 | :delay 133ms; 94 | :delay 133ms; 95 | :beep frequency=247 length=133ms; 96 | :delay 133ms; 97 | :delay 133ms; 98 | :beep frequency=233 length=133ms; 99 | :delay 133ms; 100 | :delay 133ms; 101 | :beep frequency=220 length=133ms; 102 | :delay 133ms; 103 | :delay 133ms; 104 | :beep frequency=208 length=133ms; 105 | -------------------------------------------------------------------------------- /Funny/Music/Jurassic Park.rsc: -------------------------------------------------------------------------------- 1 | :beep frequency=466 length=275ms; 2 | :delay 300ms; 3 | :beep frequency=440 length=275ms; 4 | :delay 300ms; 5 | :beep frequency=466 length=1775ms; 6 | :delay 1800ms; 7 | :beep frequency=466 length=275ms; 8 | :delay 300ms; 9 | :beep frequency=440 length=275ms; 10 | :delay 300ms; 11 | :beep frequency=466 length=1775ms; 12 | :delay 1800ms; 13 | :beep frequency=466 length=275ms; 14 | :delay 300ms; 15 | :beep frequency=440 length=275ms; 16 | :delay 300ms; 17 | :beep frequency=466 length=875ms; 18 | :delay 900ms; 19 | :beep frequency=523 length=275ms; 20 | :delay 300ms; 21 | :beep frequency=523 length=875ms; 22 | :delay 900ms; 23 | :beep frequency=622 length=275ms; 24 | :delay 300ms; 25 | :beep frequency=622 length=1775ms; 26 | :delay 1800ms; 27 | :beep frequency=587 length=275ms; 28 | :delay 300ms; 29 | :beep frequency=466 length=275ms; 30 | :delay 300ms; 31 | :beep frequency=523 length=875ms; 32 | :delay 900ms; 33 | :beep frequency=440 length=275ms; 34 | :delay 300ms; 35 | :beep frequency=349 length=575ms; 36 | :delay 600ms; 37 | :beep frequency=587 length=275ms; 38 | :delay 300ms; 39 | :beep frequency=466 length=275ms; 40 | :delay 300ms; 41 | :beep frequency=523 length=1775ms; 42 | :delay 1800ms; 43 | :beep frequency=698 length=275ms; 44 | :delay 300ms; 45 | :beep frequency=466 length=275ms; 46 | :delay 300ms; 47 | :beep frequency=622 length=875ms; 48 | :delay 900ms; 49 | :beep frequency=587 length=275ms; 50 | :delay 300ms; 51 | :beep frequency=587 length=875ms; 52 | :delay 900ms; 53 | :beep frequency=523 length=275ms; 54 | :delay 300ms; 55 | :beep frequency=523 length=3575ms; 56 | :delay 3600ms; 57 | :delay 600ms; 58 | :beep frequency=466 length=275ms; 59 | :delay 300ms; 60 | :beep frequency=440 length=275ms; 61 | :delay 300ms; 62 | :beep frequency=466 length=575ms; 63 | :delay 600ms; 64 | :beep frequency=349 length=575ms; 65 | :delay 600ms; 66 | :beep frequency=311 length=575ms; 67 | :delay 600ms; 68 | :beep frequency=466 length=275ms; 69 | :delay 300ms; 70 | :beep frequency=440 length=275ms; 71 | :delay 300ms; 72 | :beep frequency=466 length=575ms; 73 | :delay 600ms; 74 | :beep frequency=349 length=575ms; 75 | :delay 600ms; 76 | :beep frequency=311 length=575ms; 77 | :delay 600ms; 78 | :beep frequency=466 length=275ms; 79 | :delay 300ms; 80 | :beep frequency=440 length=275ms; 81 | :delay 300ms; 82 | :beep frequency=440 length=275ms; 83 | :delay 300ms; 84 | :beep frequency=466 length=875ms; 85 | :delay 900ms; 86 | :beep frequency=349 length=575ms; 87 | :delay 600ms; 88 | :beep frequency=466 length=575ms; 89 | :delay 600ms; 90 | :beep frequency=415 length=1775ms; 91 | :delay 1800ms; 92 | :beep frequency=466 length=275ms; 93 | :delay 300ms; 94 | :beep frequency=440 length=275ms; 95 | :delay 300ms; 96 | :beep frequency=466 length=575ms; 97 | :delay 600ms; 98 | :beep frequency=349 length=575ms; 99 | :delay 600ms; 100 | :beep frequency=311 length=575ms; 101 | :delay 600ms; 102 | :beep frequency=466 length=275ms; 103 | :delay 300ms; 104 | :beep frequency=440 length=275ms; 105 | :delay 300ms; 106 | :beep frequency=466 length=575ms; 107 | :delay 600ms; 108 | :beep frequency=349 length=575ms; 109 | :delay 600ms; 110 | :beep frequency=311 length=575ms; 111 | :delay 600ms; 112 | :beep frequency=466 length=275ms; 113 | :delay 300ms; 114 | :beep frequency=440 length=275ms; 115 | :delay 300ms; 116 | :beep frequency=466 length=4175ms; 117 | :delay 4200ms; -------------------------------------------------------------------------------- /Funny/Music/Final Countdown.rsc: -------------------------------------------------------------------------------- 1 | :beep frequency=880 length=100ms; 2 | :delay 100ms; 3 | :beep frequency=784 length=100ms; 4 | :delay 100ms; 5 | :beep frequency=880 length=400ms; 6 | :delay 400ms; 7 | :beep frequency=587 length=800ms; 8 | :delay 400ms; 9 | 10 | :delay 600ms; 11 | 12 | :beep frequency=932 length=100ms; 13 | :delay 100ms; 14 | :beep frequency=880 length=100ms; 15 | :delay 100ms; 16 | :beep frequency=932 length=200ms; 17 | :delay 200ms; 18 | :beep frequency=880 length=200ms; 19 | :delay 200ms; 20 | :beep frequency=784 length=800ms; 21 | :delay 400ms; 22 | 23 | :delay 600ms; 24 | 25 | :beep frequency=932 length=100ms; 26 | :delay 100ms; 27 | :beep frequency=880 length=100ms; 28 | :delay 100ms; 29 | :beep frequency=932 length=400ms; 30 | :delay 400ms; 31 | :beep frequency=587 length=800ms; 32 | :delay 400ms; 33 | 34 | :delay 600ms; 35 | 36 | :beep frequency=784 length=100ms; 37 | :delay 100ms; 38 | :beep frequency=698 length=100ms; 39 | :delay 100ms; 40 | :beep frequency=784 length=200ms; 41 | :delay 200ms; 42 | :beep frequency=698 length=200ms; 43 | :delay 200ms; 44 | :beep frequency=659 length=200ms; 45 | :delay 200ms; 46 | :beep frequency=784 length=200ms; 47 | :delay 200ms; 48 | :beep frequency=698 length=300ms; 49 | :delay 300ms; 50 | :beep frequency=659 length=100ms; 51 | :delay 100ms; 52 | :beep frequency=587 length=200ms; 53 | :delay 200ms; 54 | :beep frequency=880 length=100ms; 55 | :delay 100ms; 56 | :beep frequency=784 length=100ms; 57 | :delay 100ms; 58 | :beep frequency=880 length=400ms; 59 | :delay 400ms; 60 | :beep frequency=587 length=800ms; 61 | :delay 400ms; 62 | 63 | :delay 600ms; 64 | 65 | :beep frequency=932 length=100ms; 66 | :delay 100ms; 67 | :beep frequency=880 length=100ms; 68 | :delay 100ms; 69 | :beep frequency=932 length=200ms; 70 | :delay 200ms; 71 | :beep frequency=880 length=200ms; 72 | :delay 200ms; 73 | :beep frequency=784 length=800ms; 74 | :delay 400ms; 75 | 76 | :delay 600ms; 77 | 78 | :beep frequency=932 length=100ms; 79 | :delay 100ms; 80 | :beep frequency=880 length=100ms; 81 | :delay 100ms; 82 | :beep frequency=932 length=400ms; 83 | :delay 400ms; 84 | :beep frequency=587 length=800ms; 85 | :delay 400ms; 86 | 87 | :delay 600ms; 88 | 89 | :beep frequency=784 length=100ms; 90 | :delay 100ms; 91 | :beep frequency=698 length=100ms; 92 | :delay 100ms; 93 | :beep frequency=784 length=200ms; 94 | :delay 200ms; 95 | :beep frequency=698 length=200ms; 96 | :delay 200ms; 97 | :beep frequency=659 length=200ms; 98 | :delay 200ms; 99 | :beep frequency=784 length=200ms; 100 | :delay 200ms; 101 | :beep frequency=698 length=600ms; 102 | :delay 600ms; 103 | :beep frequency=659 length=100ms; 104 | :delay 100ms; 105 | :beep frequency=698 length=100ms; 106 | :delay 100ms; 107 | :beep frequency=784 length=600ms; 108 | :delay 600ms; 109 | :beep frequency=698 length=100ms; 110 | :delay 100ms; 111 | :beep frequency=784 length=100ms; 112 | :delay 100ms; 113 | :beep frequency=880 length=200ms; 114 | :delay 200ms; 115 | :beep frequency=784 length=200ms; 116 | :delay 200ms; 117 | :beep frequency=698 length=200ms; 118 | :delay 200ms; 119 | :beep frequency=659 length=200ms; 120 | :delay 200ms; 121 | :beep frequency=587 length=400ms; 122 | :delay 400ms; 123 | :beep frequency=932 length=400ms; 124 | :delay 400ms; 125 | :beep frequency=880 length=1200ms; 126 | :delay 1200ms; 127 | :beep frequency=880 length=100ms; 128 | :delay 100ms; 129 | :beep frequency=932 length=100ms; 130 | :delay 100ms; 131 | :beep frequency=880 length=100ms; 132 | :delay 100ms; 133 | :beep frequency=784 length=100ms; 134 | :delay 100ms; 135 | :beep frequency=880 length=1600ms; 136 | :delay 1600ms; 137 | :beep frequency=1175 length=400ms; -------------------------------------------------------------------------------- /DDNS/FreeDNS-Updater.rsc: -------------------------------------------------------------------------------- 1 | :log warning ("FreeDNS script begin") 2 | ############## Script FreeDNS.afraid.org ################## 3 | ############## CREATED LESHIY_ODESSA ################## 4 | ############## Improved by SEAN SCARFO ################## 5 | # Specify your domain or subdomain. 6 | :global "dns-domain" "woot.hello.to" 7 | 8 | # Define IP checker website variable. Any website that returns only the ip address in text format. examples listed 9 | #https://www.trackip.net/ip/ 10 | #http://wgetip.com/ 11 | #https://api.ipify.org/ 12 | #If not pointing to a specific file, must end in a / 13 | # Case sensitive. 14 | :global "wanChecker" "http://wgetip.com/" 15 | 16 | #specify your internet interface. naming does not have to be exact as long as it has "ether" in the name 17 | :global "wanInterface" "ether1" 18 | 19 | 20 | # Specify the "Direct URL", which is https://freedns.afraid.org/dynamic/ 21 | # In front of the sign "?" put a backslash "\". 22 | :global "direct-url" "https://freedns.afraid.org/dynamic/update.php\?ZDhoRDVwzRpbTFjOjE2NjQ4NTQ4" 23 | 24 | # Specify the URL API "ASCII" 25 | # Log in under your account and open the page https://freedns.afraid.org/api/ 26 | # Then copy the URL of your site - Available API Interfaces : ASCII (!!! NOT XML !!!) 27 | # ATTENTION!!!! Before the question mark, put a backslash "\". 28 | :global "api-url" "https://freedns.afraid.org/api/\?action=getdyndns&v=2&sha=142c0fbd898046f1bbfa12016cc1" 29 | 30 | 31 | 32 | # !!!!!!!!!!!!!!!!! Nothing more do not need to edit!!!!!!!!!!!!!!!!! 33 | :global "current-ip" 34 | :global "dns-domain-ip" 35 | :if ([:len $"current-ip"] <7) do={ 36 | :log error ("current-ip variable has no value, setting it to 1.2.3.4"); 37 | :global "current-ip" 1.2.3.4; 38 | } else={ 39 | :log warning ("current IP varaible exists and has a value") 40 | #pause for 1 seconds 41 | :delay 1 42 | 43 | #Fetch Current IP from ether1 44 | :global "current-ip" [/ip address get value-name=address [find interface~$"wanInterface"]] 45 | :global "current-ip-endloc" ([:len $"current-ip"] -3) 46 | :global "current-ip" [:pick $"current-ip" 0 $"current-ip-endloc"] 47 | 48 | # Compare global IP variables 49 | # Compare the external IP with the IP address of the DNS domain. 50 | :if ($"current-ip" = $"dns-domain-ip") do={ 51 | :log warning ("current-ip matches dns-domain-ip, script is done!") 52 | } else={ 53 | #pause for 1 seconds 54 | :delay 1 55 | 56 | :log error ("$"current-ip" does not match $"dns-domain-ip", updating IP FreeDNS") 57 | #pause for 1 seconds 58 | :delay 1 59 | 60 | #Fetch Last Known IP info from WanChecker 61 | /tool fetch url="$wanChecker" dst-path="/wanCheckerfile.txt" 62 | #pause for 1 seconds 63 | :delay 1 64 | 65 | # Find the current IP address on the external interface 66 | :global "current-ip" [/file get wanCheckerfile.txt contents] 67 | #pause for 1 seconds 68 | :delay 1 69 | 70 | #Fetch Last Known IP info from FreeDNS 71 | /tool fetch url=$"api-url" dst-path="/freedns.txt" 72 | #pause for 1 seconds 73 | :delay 1 74 | 75 | # Find out the IP address of the domain using the API and parsing. 76 | # Split the file 77 | :local "result" [/file get freedns.txt contents] 78 | :local "startloc" ([:find $result $"dns-domain"] + [:len $"dns-domain"] + 1) 79 | :local "endloc" ([:find $"result" "https" [:find $result $"dns-domain"]] -1) 80 | :global "dns-domain-ip" [:pick $"result" $"startloc" $"endloc"] 81 | #pause for 1 seconds 82 | :delay 1 83 | 84 | # Compare global IP variables 85 | # Compare the external IP with the IP address of the DNS domain. 86 | :if ($"current-ip" = $"dns-domain-ip") do={ 87 | :log warning ("current-ip matches dns-domain-ip, script is done!") 88 | } else={ 89 | #pause for 1 seconds 90 | :delay 1 91 | 92 | # Send new IP to freedns.afraid.org our external IP by using Direct URL 93 | :log error ("Service Dynamic DNS: old IP address $"dns-domain-ip" for $"dns-domain" CHANGED to -> $"current-ip"") 94 | /tool fetch mode=https url=$"direct-url" keep-result=no 95 | } 96 | } 97 | } 98 | :log warning ("FreeDNS script end") 99 | -------------------------------------------------------------------------------- /Tunnels/UpdateTunnelsFromComments.rsc: -------------------------------------------------------------------------------- 1 | # How to use: 2 | # Comment a tunnel something like the line below (no need for the #) 3 | # LocalDNS:somedomain.com RemoteDNS:someotherdomain.com 4 | # You don't have to use both LocalDNS and RemoteDNS, they're optional, if they're not found in a comment the tunnel is skipped 5 | # You can choose to only use LocalDNS or RemoteDNS, or both. 6 | # Schedule this script to run once a minute 7 | # See it resolve and fix all your tunnels 8 | 9 | :local LocalDNSPrefix "LocalDNS:" 10 | :local RemoteDNSPrefix "RemoteDNS:" 11 | 12 | # Arguments: DNSPrefix, EntryComment 13 | :local GetAddressFromComments do={ 14 | :local DNSnamepos [:find $EntryComment $DNSPrefix -1] 15 | if ([:len $DNSnamepos] > 0) do={ 16 | :local start ($DNSnamepos + [:len $DNSPrefix]) 17 | :local end ([:find $EntryComment " " ($DNSnamepos + [:len $DNSPrefix])]) 18 | 19 | if ([:len $end] = 0) do={ 20 | :set end [:len $EntryComment] 21 | } 22 | :local ExtractedDNSName [:pick $EntryComment $start $end] 23 | :local ResolvedIP "" 24 | 25 | :do { 26 | :set ResolvedIP [:resolve $ExtractedDNSName] 27 | } on-error={ 28 | return "" 29 | } 30 | return $ResolvedIP 31 | } 32 | return "" 33 | } 34 | 35 | # Arguments: LocalDNSPrefix, RemoteDNSPrefix, menu 36 | :local ProcessTunnels do={ 37 | # Forward declaration of function 38 | :local GetAddressFromComments; 39 | 40 | # [:parse ($menu . " command")] will resolve to whatever menu is specified in the function call 41 | 42 | :foreach i in=[[:parse ($menu . " find")]] do={ 43 | :local ifacename [[:parse ($menu . " get $i name")]] 44 | :local comment [[:parse ($menu . " get $i comment")]] 45 | 46 | :local newip [$GetAddressFromComments DNSPrefix=$LocalDNSPrefix EntryComment=$comment] 47 | 48 | if ([:len $newip] <= 0) do={ 49 | :log info "Skipping update on tunnel $ifacename, nxdomain" 50 | } else={ 51 | if ($currentip != $newip) do={ 52 | [:parse ($menu . " set $i local-address $newip")] 53 | :log info "Updated tunnel $ifacename with local-address $newip" 54 | } 55 | } 56 | 57 | :set newip [$GetAddressFromComments DNSPrefix=$RemoteDNSPrefix EntryComment=$comment] 58 | 59 | if ([:len $newip] <= 0) do={ 60 | :log info "Skipping update on tunnel $ifacename, nxdomain" 61 | } else={ 62 | if ($currentip != $newip) do={ 63 | [:parse ($menu . " set $i remote-address $newip")] 64 | :log info "Updated tunnel $ifacename with remote-address $newip" 65 | } 66 | } 67 | } 68 | } 69 | 70 | foreach i in=[/ip ipsec peer find where !dynamic] do={ 71 | :local tunnelname [/ip ipsec peer get $i name] 72 | :local comment [/ip ipsec peer get $i comment] 73 | :local newip [$GetAddressFromComments DNSPrefix=$LocalDNSPrefix EntryComment=$comment] 74 | 75 | if ([:len $newip] <= 0) do={ 76 | :log info "Skipping update on ipsec tunnel $tunnelname, nxdomain" 77 | } else={ 78 | if ($currentip != $newip) do={ 79 | /ip ipsec peer set $i local-address=$newip 80 | :log info "Updated ipsec tunnel $tunnelname with local address $newip" 81 | } 82 | } 83 | 84 | :set newip [$GetAddressFromComments DNSPrefix=$RemoteDNSPrefix EntryComment=$comment] 85 | 86 | if ([:len $newip] <= 0) do={ 87 | :log info "Skipping remote update on ipsec tunnel $tunnelname, nxdomain" 88 | } else={ 89 | if ($currentip != $newip) do={ 90 | /ip ipsec peer set $i address=$newip 91 | :log info "Updated ipsec tunnel $tunnelname with remote address $newip" 92 | } 93 | } 94 | } 95 | 96 | $ProcessTunnels LocalDNSPrefix=$LocalDNSPrefix RemoteDNSPrefix=$RemoteDNSPrefix menu="/interface gre" 97 | $ProcessTunnels LocalDNSPrefix=$LocalDNSPrefix RemoteDNSPrefix=$RemoteDNSPrefix menu="/interface eoip" 98 | $ProcessTunnels LocalDNSPrefix=$LocalDNSPrefix RemoteDNSPrefix=$RemoteDNSPrefix menu="/interface ipip" 99 | -------------------------------------------------------------------------------- /OpenVPN/MikroTikVPN.ovpn: -------------------------------------------------------------------------------- 1 | ############################################## 2 | # Sample client-side OpenVPN 2.0 config file # 3 | # for connecting to multi-client server. # 4 | # # 5 | # This configuration can be used by multiple # 6 | # clients, however each client should have # 7 | # its own cert and key files. # 8 | # # 9 | # On Windows, you might want to rename this # 10 | # file so it has a .ovpn extension # 11 | ############################################## 12 | 13 | # We're using password authentication because ease of use 14 | auth-user-pass 15 | 16 | # Route all RFC1918 subnets over the VPN 17 | # This should probably be changed to only accomodate the customers subnets 18 | route 10.0.0.0 255.0.0.0 19 | route 172.16.0.0 255.240.0.0 20 | route 192.168.0.0 255.255.0.0 21 | 22 | # Specify that we are a client and that we 23 | # will be pulling certain config file directives 24 | # from the server. 25 | client 26 | 27 | # Use the same setting as you are using on 28 | # the server. 29 | # On most systems, the VPN will not function 30 | # unless you partially or fully disable 31 | # the firewall for the TUN/TAP interface. 32 | 33 | # tun means we're routing everything (no bridge) 34 | # see https://community.openvpn.net/openvpn/wiki/BridgingAndRouting 35 | ;dev tap 36 | dev tun 37 | 38 | # Windows needs the TAP-Win32 adapter name 39 | # from the Network Connections panel 40 | # if you have more than one. On XP SP2, 41 | # you may need to disable the firewall 42 | # for the TAP adapter. 43 | ;dev-node MyTap 44 | 45 | # Are we connecting to a TCP or 46 | # UDP server? Use the same setting as 47 | # on the server. 48 | proto tcp 49 | 50 | # The hostname/IP and port of the server. 51 | # You can have multiple remote entries 52 | # to load balance between the servers. 53 | remote dnsname 1194 54 | remote dnsname 53 55 | remote dnsname 80 56 | remote dnsname 443 57 | 58 | # Choose a random host from the remote 59 | # list for load-balancing. Otherwise 60 | # try hosts in the order specified. 61 | ;remote-random 62 | 63 | # Keep trying indefinitely to resolve the 64 | # host name of the OpenVPN server. Very useful 65 | # on machines which are not permanently connected 66 | # to the internet such as laptops. 67 | resolv-retry infinite 68 | 69 | # Most clients don't need to bind to 70 | # a specific local port number. 71 | nobind 72 | 73 | # Downgrade privileges after initialization (non-Windows only) 74 | ;user nobody 75 | ;group nobody 76 | 77 | # Try to preserve some state across restarts. 78 | persist-key 79 | persist-tun 80 | 81 | # If you are connecting through an 82 | # HTTP proxy to reach the actual OpenVPN 83 | # server, put the proxy server/IP and 84 | # port number here. See the man page 85 | # if your proxy server requires 86 | # authentication. 87 | ;http-proxy-retry # retry on connection failures 88 | ;http-proxy [proxy server] [proxy port #] 89 | 90 | # Wireless networks often produce a lot 91 | # of duplicate packets. Set this flag 92 | # to silence duplicate packet warnings. 93 | ;mute-replay-warnings 94 | 95 | # SSL/TLS parms. 96 | # See the server config file for more 97 | # description. It's best to use 98 | # a separate .crt/.key file pair 99 | # for each client. A single ca 100 | # file can be used for all clients. 101 | ca cert_export_ca.crt 102 | ;cert client.crt 103 | ;key client.key 104 | 105 | # Verify server certificate by checking that the 106 | # certicate has the correct key usage set. 107 | # This is an important precaution to protect against 108 | # a potential attack discussed here: 109 | # http://openvpn.net/howto.html#mitm 110 | # 111 | # To use this feature, you will need to generate 112 | # your server certificates with the keyUsage set to 113 | # digitalSignature, keyEncipherment 114 | # and the extendedKeyUsage to 115 | # serverAuth 116 | # EasyRSA can do this for you. 117 | remote-cert-tls server 118 | 119 | # If a tls-auth key is used on the server 120 | # then every client must also have the key. 121 | ;tls-auth ta.key 1 122 | 123 | # Select a cryptographic cipher. 124 | # If the cipher option is used on the server 125 | # then you must also specify it here. 126 | # Note that v2.4 client/server will automatically 127 | # negotiate AES-256-GCM in TLS mode. 128 | # See also the ncp-cipher option in the manpage 129 | cipher AES-128-CBC 130 | data-ciphers AES-128-CBC 131 | 132 | # Enable compression on the VPN link. 133 | # Don't enable this unless it is also 134 | # enabled in the server config file. 135 | #comp-lzo 136 | 137 | # Set log file verbosity. 138 | verb 3 139 | 140 | # Silence repeating messages 141 | mute 20 142 | -------------------------------------------------------------------------------- /Funny/Westminster.rsc: -------------------------------------------------------------------------------- 1 | /system script 2 | add name="Westminister Seq #1" owner=admin policy=ftp,reboot,read,write,policy,test,password,sniff source=\ 3 | "#Westminister Sequence #1\r\ 4 | \n# E-660 D-588 C-528 G-396\r\ 5 | \n# EDCG\r\ 6 | \n:beep length=480ms frequency=660\r\ 7 | \n:delay 500ms\r\ 8 | \n:beep length=480ms frequency=588\r\ 9 | \n:delay 500ms\r\ 10 | \n:beep length=480ms frequency=528\r\ 11 | \n:delay 500ms\r\ 12 | \n:beep length=480ms frequency=396" 13 | add name="Westminister Seq #2" owner=admin policy=ftp,reboot,read,write,policy,test,password,sniff source=\ 14 | "#Westminister Sequence #2\r\ 15 | \n# E-660 D-588 C-528 G-396\r\ 16 | \n# CEDG\r\ 17 | \n:beep length=480ms frequency=528\r\ 18 | \n:delay 500ms\r\ 19 | \n:beep length=480ms frequency=660\r\ 20 | \n:delay 500ms\r\ 21 | \n:beep length=480ms frequency=588\r\ 22 | \n:delay 500ms\r\ 23 | \n:beep length=480ms frequency=396" 24 | add name="Westminister Seq #3" owner=admin policy=ftp,reboot,read,write,policy,test,password,sniff source=\ 25 | "#Westminister Sequence #3\r\ 26 | \n# E-660 D-588 C-523 G-396\r\ 27 | \n# CDEC\r\ 28 | \n:beep length=480ms frequency=523\r\ 29 | \n:delay 500ms\r\ 30 | \n:beep length=480ms frequency=588\r\ 31 | \n:delay 500ms\r\ 32 | \n:beep length=480ms frequency=659\r\ 33 | \n:delay 500ms\r\ 34 | \n:beep length=480ms frequency=528" 35 | add name="Westminister Seq #4" owner=admin policy=ftp,reboot,read,write,policy,test,password,sniff source=\ 36 | "#Westminister Sequence #4\r\ 37 | \n# E-660 D-588 C-528 G-396\r\ 38 | \n# ECDG\r\ 39 | \n:beep length=480ms frequency=660\r\ 40 | \n:delay 500ms\r\ 41 | \n:beep length=480ms frequency=528\r\ 42 | \n:delay 500ms\r\ 43 | \n:beep length=480ms frequency=588\r\ 44 | \n:delay 500ms\r\ 45 | \n:beep length=480ms frequency=396\r\ 46 | \n" 47 | add name="Westminister Seq #5" owner=admin policy=ftp,reboot,read,write,policy,test,password,sniff source=\ 48 | "#Westminister Sequence #5\r\ 49 | \n# E-660 D-588 C-528 G-396\r\ 50 | \n# GDEC\r\ 51 | \n:beep length=480ms frequency=396\r\ 52 | \n:delay 500ms\r\ 53 | \n:beep length=480ms frequency=588\r\ 54 | \n:delay 500ms\r\ 55 | \n:beep length=480ms frequency=660\r\ 56 | \n:delay 500ms\r\ 57 | \n:beep length=480ms frequency=528" 58 | add name="Westminister Chime" owner=admin policy=ftp,reboot,read,write,policy,test,password source="#Westminister Chime\r\ 59 | \n#Chimes the number of times that the hour is.\r\ 60 | \n:global h\r\ 61 | \n:global ch\r\ 62 | \n:if ( \$h >12 ) do= {\r\ 63 | \n:set ch ( \$h - 12 )\r\ 64 | \n:};\r\ 65 | \n:if ( \$h < 12 ) do= {\r\ 66 | \n:set ch \$h\r\ 67 | \n:}\r\ 68 | \n:if ( \$h=0 ) do= {\r\ 69 | \n:set ch ( \$h + 12 )\r\ 70 | \n:}\r\ 71 | \n\r\ 72 | \n:for i from=1 to=\$ch step=1 do={\r\ 73 | \n:beep length=1000ms frequency=440;\r\ 74 | \n:delay 2000ms\r\ 75 | \n:}" 76 | add name=Westminister owner=admin policy=ftp,reboot,read,write,policy,test,password,sniff source=":global c 11:00:00\r\ 77 | \n:global h 0\r\ 78 | \n:global m 0\r\ 79 | \n:global s 0\r\ 80 | \n:set c [/system clock get time ]\r\ 81 | \n:set h [ :tonum [:pick \$c 0 2 ] ]\r\ 82 | \n:set m [ :tonum [:pick \$c 3 5 ] ]\r\ 83 | \n:set s [ :tonum [:pick \$c 6 8 ] ]\r\ 84 | \n\r\ 85 | \n#Really should put a limiter in here so it does not chime all night longwhen no one is around to hear it.\r\ 86 | \n\r\ 87 | \n# First-quarter Sequence 1\r\ 88 | \n:if ( \$m=15 ) do {/system script run \"Westminister Seq #1\"}\r\ 89 | \n\r\ 90 | \n# Half-hour Sequence 2,3\r\ 91 | \n:if ( \$m = 30 ) do {/system script run \"Westminister Seq #2\"}\r\ 92 | \n:if ( \$m = 30 ) do { :delay 2000ms }\r\ 93 | \n:if ( \$m = 30 ) do {/system script run \"Westminister Seq #3\"}\r\ 94 | \n\r\ 95 | \n# Third-quarter Sequence 4,5,1\r\ 96 | \n:if ( \$m = 45 ) do {/system script run \"Westminister Seq #4\"}\r\ 97 | \n:if ( \$m = 45 ) do { :delay 2000ms }\r\ 98 | \n:if ( \$m = 45 ) do {/system script run \"Westminister Seq #5\"}\r\ 99 | \n:if ( \$m = 45 ) do { :delay 2000ms }\r\ 100 | \n:if ( \$m = 45 ) do {/system script run \"Westminister Seq #1\"}\r\ 101 | \n\r\ 102 | \n# Full-hour Sequence 2,3,4,5\r\ 103 | \n:if ( \$m = 0 ) do {/system script run \"Westminister Seq #2\"}\r\ 104 | \n:if ( \$m = 0 ) do { :delay 2000ms }\r\ 105 | \n:if ( \$m = 0 ) do {/system script run \"Westminister Seq #3\"}\r\ 106 | \n:if ( \$m = 0 ) do { :delay 2000ms }\r\ 107 | \n:if ( \$m = 0 ) do {/system script run \"Westminister Seq #4\"}\r\ 108 | \n:if ( \$m = 0 ) do { :delay 2000ms }\r\ 109 | \n:if ( \$m = 0 ) do {/system script run \"Westminister Seq #5\"}\r\ 110 | \n:if ( \$m = 0 ) do { :delay 2000ms }\r\ 111 | \n:if ( \$m = 0 ) do {/system script run \"Westminister Chime\"}\r\ 112 | \n:if ( \$m = 0 ) do { :delay 2000ms }" 113 | /system scheduler 114 | add interval=15m name=Westminister on-event=Westminister policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive start-date=jan/01/1970 start-time=00:00:00 115 | -------------------------------------------------------------------------------- /Funny/Music/SuperMario.rsc: -------------------------------------------------------------------------------- 1 | :beep frequency=660 length=100ms; 2 | :delay 150ms; 3 | :beep frequency=660 length=100ms; 4 | :delay 300ms; 5 | :beep frequency=660 length=100ms; 6 | :delay 300ms; 7 | :beep frequency=510 length=100ms; 8 | :delay 100ms; 9 | :beep frequency=660 length=100ms; 10 | :delay 300ms; 11 | :beep frequency=770 length=100ms; 12 | :delay 550ms; 13 | :beep frequency=380 length=100ms; 14 | :delay 575ms; 15 | 16 | :beep frequency=510 length=100ms; 17 | :delay 450ms; 18 | :beep frequency=380 length=100ms; 19 | :delay 400ms; 20 | :beep frequency=320 length=100ms; 21 | :delay 500ms; 22 | :beep frequency=440 length=100ms; 23 | :delay 300ms; 24 | :beep frequency=480 length=80ms; 25 | :delay 330ms; 26 | :beep frequency=450 length=100ms; 27 | :delay 150ms; 28 | :beep frequency=430 length=100ms; 29 | :delay 300ms; 30 | :beep frequency=380 length=100ms; 31 | :delay 200ms; 32 | :beep frequency=660 length=80ms; 33 | :delay 200ms; 34 | :beep frequency=760 length=50ms; 35 | :delay 150ms; 36 | :beep frequency=860 length=100ms; 37 | :delay 300ms; 38 | :beep frequency=700 length=80ms; 39 | :delay 150ms; 40 | :beep frequency=760 length=50ms; 41 | :delay 350ms; 42 | :beep frequency=660 length=80ms; 43 | :delay 300ms; 44 | :beep frequency=520 length=80ms; 45 | :delay 150ms; 46 | :beep frequency=580 length=80ms; 47 | :delay 150ms; 48 | :beep frequency=480 length=80ms; 49 | :delay 500ms; 50 | 51 | :beep frequency=510 length=100ms; 52 | :delay 450ms; 53 | :beep frequency=380 length=100ms; 54 | :delay 400ms; 55 | :beep frequency=320 length=100ms; 56 | :delay 500ms; 57 | :beep frequency=440 length=100ms; 58 | :delay 300ms; 59 | :beep frequency=480 length=80ms; 60 | :delay 330ms; 61 | :beep frequency=450 length=100ms; 62 | :delay 150ms; 63 | :beep frequency=430 length=100ms; 64 | :delay 300ms; 65 | :beep frequency=380 length=100ms; 66 | :delay 200ms; 67 | :beep frequency=660 length=80ms; 68 | :delay 200ms; 69 | :beep frequency=760 length=50ms; 70 | :delay 150ms; 71 | :beep frequency=860 length=100ms; 72 | :delay 300ms; 73 | :beep frequency=700 length=80ms; 74 | :delay 150ms; 75 | :beep frequency=760 length=50ms; 76 | :delay 350ms; 77 | :beep frequency=660 length=80ms; 78 | :delay 300ms; 79 | :beep frequency=520 length=80ms; 80 | :delay 150ms; 81 | :beep frequency=580 length=80ms; 82 | :delay 150ms; 83 | :beep frequency=480 length=80ms; 84 | :delay 500ms; 85 | 86 | :beep frequency=500 length=100ms; 87 | :delay 300ms; 88 | 89 | :beep frequency=760 length=100ms; 90 | :delay 100ms; 91 | :beep frequency=720 length=100ms; 92 | :delay 150ms; 93 | :beep frequency=680 length=100ms; 94 | :delay 150ms; 95 | :beep frequency=620 length=150ms; 96 | :delay 300ms; 97 | 98 | :beep frequency=650 length=150ms; 99 | :delay 300ms; 100 | :beep frequency=380 length=100ms; 101 | :delay 150ms; 102 | :beep frequency=430 length=100ms; 103 | :delay 150ms; 104 | 105 | :beep frequency=500 length=100ms; 106 | :delay 300ms; 107 | :beep frequency=430 length=100ms; 108 | :delay 150ms; 109 | :beep frequency=500 length=100ms; 110 | :delay 100ms; 111 | :beep frequency=570 length=100ms; 112 | :delay 220ms; 113 | 114 | :beep frequency=500 length=100ms; 115 | :delay 300ms; 116 | 117 | :beep frequency=760 length=100ms; 118 | :delay 100ms; 119 | :beep frequency=720 length=100ms; 120 | :delay 150ms; 121 | :beep frequency=680 length=100ms; 122 | :delay 150ms; 123 | :beep frequency=620 length=150ms; 124 | :delay 300ms; 125 | 126 | :beep frequency=650 length=200ms; 127 | :delay 300ms; 128 | 129 | :beep frequency=1020 length=80ms; 130 | :delay 300ms; 131 | :beep frequency=1020 length=80ms; 132 | :delay 150ms; 133 | :beep frequency=1020 length=80ms; 134 | :delay 300ms; 135 | 136 | :beep frequency=380 length=100ms; 137 | :delay 300ms; 138 | :beep frequency=500 length=100ms; 139 | :delay 300ms; 140 | 141 | :beep frequency=760 length=100ms; 142 | :delay 100ms; 143 | :beep frequency=720 length=100ms; 144 | :delay 150ms; 145 | :beep frequency=680 length=100ms; 146 | :delay 150ms; 147 | :beep frequency=620 length=150ms; 148 | :delay 300ms; 149 | 150 | :beep frequency=650 length=150ms; 151 | :delay 300ms; 152 | :beep frequency=380 length=100ms; 153 | :delay 150ms; 154 | :beep frequency=430 length=100ms; 155 | :delay 150ms; 156 | 157 | :beep frequency=500 length=100ms; 158 | :delay 300ms; 159 | :beep frequency=430 length=100ms; 160 | :delay 150ms; 161 | :beep frequency=500 length=100ms; 162 | :delay 100ms; 163 | :beep frequency=570 length=100ms; 164 | :delay 420ms; 165 | 166 | :beep frequency=585 length=100ms; 167 | :delay 450ms; 168 | 169 | :beep frequency=550 length=100ms; 170 | :delay 420ms; 171 | 172 | :beep frequency=500 length=100ms; 173 | :delay 360ms; 174 | 175 | :beep frequency=380 length=100ms; 176 | :delay 300ms; 177 | :beep frequency=500 length=100ms; 178 | :delay 300ms; 179 | :beep frequency=500 length=100ms; 180 | :delay 150ms; 181 | :beep frequency=500 length=100ms; 182 | :delay 300ms; 183 | 184 | :beep frequency=500 length=100ms; 185 | :delay 300ms; 186 | 187 | :beep frequency=760 length=100ms; 188 | :delay 100ms; 189 | :beep frequency=720 length=100ms; 190 | :delay 150ms; 191 | :beep frequency=680 length=100ms; 192 | :delay 150ms; 193 | :beep frequency=620 length=150ms; 194 | :delay 300ms; 195 | 196 | :beep frequency=650 length=150ms; 197 | :delay 300ms; 198 | :beep frequency=380 length=100ms; 199 | :delay 150ms; 200 | :beep frequency=430 length=100ms; 201 | :delay 150ms; 202 | 203 | :beep frequency=500 length=100ms; 204 | :delay 300ms; 205 | :beep frequency=430 length=100ms; 206 | :delay 150ms; 207 | :beep frequency=500 length=100ms; 208 | :delay 100ms; 209 | :beep frequency=570 length=100ms; 210 | :delay 220ms; 211 | 212 | :beep frequency=500 length=100ms; 213 | :delay 300ms; 214 | 215 | :beep frequency=760 length=100ms; 216 | :delay 100ms; 217 | :beep frequency=720 length=100ms; 218 | :delay 150ms; 219 | :beep frequency=680 length=100ms; 220 | :delay 150ms; 221 | :beep frequency=620 length=150ms; 222 | :delay 300ms; 223 | 224 | :beep frequency=650 length=200ms; 225 | :delay 300ms; 226 | 227 | :beep frequency=1020 length=80ms; 228 | :delay 300ms; 229 | :beep frequency=1020 length=80ms; 230 | :delay 150ms; 231 | :beep frequency=1020 length=80ms; 232 | :delay 300ms; 233 | 234 | :beep frequency=380 length=100ms; 235 | :delay 300ms; 236 | :beep frequency=500 length=100ms; 237 | :delay 300ms; 238 | 239 | :beep frequency=760 length=100ms; 240 | :delay 100ms; 241 | :beep frequency=720 length=100ms; 242 | :delay 150ms; 243 | :beep frequency=680 length=100ms; 244 | :delay 150ms; 245 | :beep frequency=620 length=150ms; 246 | :delay 300ms; 247 | 248 | :beep frequency=650 length=150ms; 249 | :delay 300ms; 250 | :beep frequency=380 length=100ms; 251 | :delay 150ms; 252 | :beep frequency=430 length=100ms; 253 | :delay 150ms; 254 | 255 | :beep frequency=500 length=100ms; 256 | :delay 300ms; 257 | :beep frequency=430 length=100ms; 258 | :delay 150ms; 259 | :beep frequency=500 length=100ms; 260 | :delay 100ms; 261 | :beep frequency=570 length=100ms; 262 | :delay 420ms; 263 | 264 | :beep frequency=585 length=100ms; 265 | :delay 450ms; 266 | 267 | :beep frequency=550 length=100ms; 268 | :delay 420ms; 269 | 270 | :beep frequency=500 length=100ms; 271 | :delay 360ms; 272 | 273 | :beep frequency=380 length=100ms; 274 | :delay 300ms; 275 | :beep frequency=500 length=100ms; 276 | :delay 300ms; 277 | :beep frequency=500 length=100ms; 278 | :delay 150ms; 279 | :beep frequency=500 length=100ms; 280 | :delay 300ms; 281 | 282 | :beep frequency=500 length=60ms; 283 | :delay 150ms; 284 | :beep frequency=500 length=80ms; 285 | :delay 300ms; 286 | :beep frequency=500 length=60ms; 287 | :delay 350ms; 288 | :beep frequency=500 length=80ms; 289 | :delay 150ms; 290 | :beep frequency=580 length=80ms; 291 | :delay 350ms; 292 | :beep frequency=660 length=80ms; 293 | :delay 150ms; 294 | :beep frequency=500 length=80ms; 295 | :delay 300ms; 296 | :beep frequency=430 length=80ms; 297 | :delay 150ms; 298 | :beep frequency=380 length=80ms; 299 | :delay 600ms; 300 | 301 | :beep frequency=500 length=60ms; 302 | :delay 150ms; 303 | :beep frequency=500 length=80ms; 304 | :delay 300ms; 305 | :beep frequency=500 length=60ms; 306 | :delay 350ms; 307 | :beep frequency=500 length=80ms; 308 | :delay 150ms; 309 | :beep frequency=580 length=80ms; 310 | :delay 150ms; 311 | :beep frequency=660 length=80ms; 312 | :delay 550ms; 313 | 314 | :beep frequency=870 length=80ms; 315 | :delay 325ms; 316 | :beep frequency=760 length=80ms; 317 | :delay 600ms; 318 | 319 | :beep frequency=500 length=60ms; 320 | :delay 150ms; 321 | :beep frequency=500 length=80ms; 322 | :delay 300ms; 323 | :beep frequency=500 length=60ms; 324 | :delay 350ms; 325 | :beep frequency=500 length=80ms; 326 | :delay 150ms; 327 | :beep frequency=580 length=80ms; 328 | :delay 350ms; 329 | :beep frequency=660 length=80ms; 330 | :delay 150ms; 331 | :beep frequency=500 length=80ms; 332 | :delay 300ms; 333 | :beep frequency=430 length=80ms; 334 | :delay 150ms; 335 | :beep frequency=380 length=80ms; 336 | :delay 600ms; 337 | 338 | :beep frequency=660 length=100ms; 339 | :delay 150ms; 340 | :beep frequency=660 length=100ms; 341 | :delay 300ms; 342 | :beep frequency=660 length=100ms; 343 | :delay 300ms; 344 | :beep frequency=510 length=100ms; 345 | :delay 100ms; 346 | :beep frequency=660 length=100ms; 347 | :delay 300ms; 348 | :beep frequency=770 length=100ms; 349 | :delay 550ms; 350 | :beep frequency=380 length=100ms; 351 | :delay 575ms; -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | {one line to give the program's name and a brief idea of what it does.} 635 | Copyright (C) {year} {name of author} 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | {project} Copyright (C) {year} {fullname} 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | --------------------------------------------------------------------------------