Cassandra backend for FreeRADIUS.
Please make sure that in accounting section of the site config, cassacctsupplement appears before cassacct, cassauth should also be added to the accounting section to enforce Simultaneous-Use checks.
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <sys/ioctl.h> | |
#include <linux/fb.h> | |
#include <errno.h> | |
#include <string.h> | |
#include <rfb/rfb.h> | |
#include <semaphore.h> |
Cassandra backend for FreeRADIUS.
Please make sure that in accounting section of the site config, cassacctsupplement appears before cassacct, cassauth should also be added to the accounting section to enforce Simultaneous-Use checks.
#!/usr/bin/env python3 | |
from os import listdir | |
from time import time, sleep | |
from math import log10, copysign | |
from typing import List | |
energy = dict() | |
si_prefix = 'M', 'k', '', 'm', 'u' | |
hsign = lambda x: copysign(0.5, x) | |
def stat_energy(domain: str, readout: int, rollover: int) -> int: |
# >>> 111 | |
# <<< Your token: 111,9f2f2061e1898665c6ae49e665bc5f344a6005104c242d53f74c8548de7a468569dacd3a006354ef5dfdd8151e996ff1b981f24270287b6462c6b97509490041 | |
# >>> 222 | |
# <<< Your token: 222,9f2f2061e1898665c6ae49e665bc5f344a6005104c242d53f74c8548de7a4685377f65dbb5b54173f4626ccd8b765b2cc75d7a4e4949a43614528f496710c986 | |
# ECDSA overview: | |
# 0. Private key d, curve generator point G, message m | |
# 1. Select any number k | |
# 2. Calculate r = (kG).x, if r = 0 goto 1 | |
# 3. Calculate s = (m+rd)/k, if s = 0 goto 1 |