Initial push 0.2.0

This commit is contained in:
Alex Rennie-Lis
2024-04-05 22:57:26 +01:00
parent 93472ae250
commit 1d8bd0c989
55 changed files with 3515 additions and 0 deletions

48
code/node_modules/radius/accounting.js generated vendored Normal file
View File

@@ -0,0 +1,48 @@
// Copyright (c) 2018, RetailNext, Inc.
// This material contains trade secrets and confidential information of
// RetailNext, Inc. Any use, reproduction, disclosure or dissemination
// is strictly prohibited without the explicit written permission
// of RetailNext, Inc.
// All rights reserved.
var fs = require("fs");
var radius = require("./lib/radius");
var dgram = require('dgram');
var dst_ip = "127.0.0.1";
var client = dgram.createSocket("udp4");
client.bind(49001);
var secret = "secret";
var attrs = {
'User-Name': 'jlpicard',
'User-Password': 'beverly',
'Service-Type': 'Login-User',
'NAS-IP-Address': '169.134.68.136'
};
var packet = radius.encode({
code: 'Access-Request',
identifier: 1,
attributes: attrs,
secret: secret
});
fs.writeFileSync("/tmp/short_password.packet", packet);
client.send(packet, 0, packet.length, 1812, dst_ip, function() {
attrs['User-Password'] = 'beverly-crusher-123';
packet = radius.encode({
code: 'Access-Request',
identifier: 2,
attributes: attrs,
secret: secret
});
fs.writeFileSync("/tmp/long_password.packet", packet);
client.send(packet, 0, packet.length, 1812, dst_ip, function() {
client.close();
});
});