Skip to content

Instantly share code, notes, and snippets.

View rakeshmukundan's full-sized avatar

Rakesh Mukundan rakeshmukundan

View GitHub Profile
@rakeshmukundan
rakeshmukundan / import-accounts.csv
Created June 5, 2024 12:11
Sample file for spotipo user account import
username password duration_val duration_type bytes_t num_devices speed_dl speed_ul notes bytes_type
user2_1day_ulimited password 1 3 0 0 0 0 notes1 1
#!/usr/bin/env sh
# inspired from https://github.com/unifi-utilities/unifios-utilities/blob/main/on-boot-script/remote_install.sh
SYSTEMCTL_PATH="/etc/systemd/system/spotipo-tunnel.service"
SYMLINK_SYSTEMCTL="/etc/systemd/system/multi-user.target.wants/spotipo-tunnel.service"
# --- Functions ---
[Unit]
Description=AutoSSH tunnel service to spotipo
After=network.target
[Service]
Environment="AUTOSSH_GATETIME=0"
ExecStart=/usr/bin/autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -N -R /:localhost:443 1swrpfw4179aw70@ssh.tunnel.spotipo.com -p 3333
[Install]
WantedBy=multi-user.target
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxqcRfiyt798rRgWqpaOZpIlBPYBgf3g7vVhYgrgdPz7bSVtzYRcN1ZPcipjpquO9U4kFKLL9KG8yBp6dZuHwdTUPsfl3ziF4jEpi+PsaF9xXVZ7i94UHsLDtFReJPHhBroxzABrUWPF96/K26DRq6PdJWak+j8IYqZudhMbGJbwee/AjibN/TBdiQtDHC6GKWJm0s0ziX5LdyU6wEWz7Gx0aubEIsaPHVlr9bHjHDRi9wTcG0uaYNVZXy9+I12Im/0ZjbIk9pIyTB4zqD6JwukbemRVWYEUsIYzFFEnALpvJuxY+724ewq5NSZW8cLqUv6us6NgkQ4NT9UsOeEdS+WnU0ch1YI7HZTq/LuKhZJjImJXLA2tuQ/6S+yBwGShdK6c5ITurBO4sTLwRh1+w5Gl41kAvGRj8GVl6l4sV+dt640B+FZ7T8OkhZxvsL6wbYzlZbBH3XQcCrt23Nk4I+LZ0ParWq9O2txz7DNMSdYMhwzI37yYOM83xlfYnBF0c= rakeshmukundan@Rakeshs-MacBook-Pro-2.local
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxqcRfiyt798rRgWqpaOZpIlBPYBgf3g7vVhYgrgdPz7bSVtzYRcN1ZPcipjpquO9U4kFKLL9KG8yBp6dZuHwdTUPsfl3ziF4jEpi+PsaF9xXVZ7i94UHsLDtFReJPHhBroxzABrUWPF96/K26DRq6PdJWak+j8IYqZudhMbGJbwee/AjibN/TBdiQtDHC6GKWJm0s0ziX5LdyU6wEWz7Gx0aubEIsaPHVlr9bHjHDRi9wTcG0uaYNVZXy9+I12Im/0ZjbIk9pIyTB4zqD6JwukbemRVWYEUsIYzFFEnALpvJuxY+724ewq5NSZW8cLqUv6us6NgkQ4NT9UsOeEdS+WnU0ch1YI7HZTq/LuKhZJjImJXLA2tuQ/6S+yBwGShdK6c5ITurBO4sTLwRh1+w5Gl41kAvGRj8GVl6l4sV+dt640B+FZ7T8OkhZxvsL6wbYzlZbBH3XQcCrt23Nk4I+LZ0ParWq9O2txz7DNMSdYMhwzI37yYOM83xlfYnBF0c= rakeshmukundan@Rakeshs-MacBook-Pro-2.local
@rakeshmukundan
rakeshmukundan / Spotipo_cisco_wlc_flexconnect.txt
Created April 20, 2020 07:33
How to configure flexconnect acl in spotipo
Click on FlexConnect ACLs if you use FlexConnect on the left and then New at the top right. Configure with:
+--------------------------+------------+
| Field | Value |
+--------------------------+------------+
| Access Control List Name | Guest WiFi |
| ACL Type | IPv4 |
+--------------------------+------------+
Now click Add New Rule and create two rules with the below data
+---------------------+-------------------+------------------+
| Seq | 1 | 2 |
@rakeshmukundan
rakeshmukundan / Spotipo_cisco_wlc_flexconnect.txt
Created April 20, 2020 07:33
How to configure flexconnect acl in spotipo
Click on FlexConnect ACLs if you use FlexConnect on the left and then New at the top right. Configure with:
+--------------------------+------------+
| Field | Value |
+--------------------------+------------+
| Access Control List Name | Guest WiFi |
| ACL Type | IPv4 |
+--------------------------+------------+
Now click Add New Rule and create two rules with the below data
+---------------------+-------------------+------------------+
| Seq | 1 | 2 |
@rakeshmukundan
rakeshmukundan / login.html
Last active May 15, 2020 08:21
Mikrotik login portal for spotipo cloud ( https://spotipo.com)
<html><head>
<title>HotSpot System Login</title>
</head>
<body>
<form name="redirect" action="https://logme2wifi.com/mikrotik/guest/" method="GET">
<input type="hidden" name="res" value="notyet" />
<input type="hidden" name="mac" value="$(mac)" />
<input type="hidden" name="user" value="$(username)" />
<input type="hidden" name="uamport" value="mikrotik" />
@rakeshmukundan
rakeshmukundan / fabfile_exaple1.py
Created July 29, 2019 11:05
Fabric 2.x example with ssh key and passpgrase
import time
from fabric import Connection
from fabric import task
con = Connection(host,'root',connect_kwargs={'key_filename':['/root/.ssh/id_rsa'],'passphrase':''})
print(con.run('hostname'))
sudo wget -O /usr/share/nginx/spotipo/unifispot/modules/unifi/controller.py https://gist.githubusercontent.com/rakeshmukundan/6d818a2cb2d7307179fc5eae4687f3a8/raw/b62931ea3d7b1872a9ebd5860275d2c975061190/controller.py
sudo chown www-data:www-data -R /usr/share/nginx/spotipo/unifispot/
sudo service supervisor restart