This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2009-2016 Realtek Semiconductor Corp. | |
* All Rights Reserved. | |
* | |
* This program is the proprietary software of Realtek Semiconductor | |
* Corporation and/or its licensors, and only be used, duplicated, | |
* modified or distributed under the authorized license from Realtek. | |
* | |
* ANY USE OF THE SOFTWARE OTHER THAN AS AUTHORIZED UNDER | |
* THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2009-2016 Realtek Semiconductor Corp. | |
* All Rights Reserved. | |
* | |
* This program is the proprietary software of Realtek Semiconductor | |
* Corporation and/or its licensors, and only be used, duplicated, | |
* modified or distributed under the authorized license from Realtek. | |
* | |
* ANY USE OF THE SOFTWARE OTHER THAN AS AUTHORIZED UNDER | |
* THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2009-2016 Realtek Semiconductor Corp. | |
* All Rights Reserved. | |
* | |
* This program is the proprietary software of Realtek Semiconductor | |
* Corporation and/or its licensors, and only be used, duplicated, | |
* modified or distributed under the authorized license from Realtek. | |
* | |
* ANY USE OF THE SOFTWARE OTHER THAN AS AUTHORIZED UNDER | |
* THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const cors = require('cors'); | |
const crypto = require('crypto'); | |
// Secret key for token signing (use environment variable in production) | |
const TOKEN_SECRET = 'your-secret-key-1234567890'; | |
// Global users table with dummy users |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2009-2016 Realtek Semiconductor Corp. | |
* All Rights Reserved. | |
* | |
* This program is the proprietary software of Realtek Semiconductor | |
* Corporation and/or its licensors, and only be used, duplicated, | |
* modified or distributed under the authorized license from Realtek. | |
* | |
* ANY USE OF THE SOFTWARE OTHER THAN AS AUTHORIZED UNDER | |
* THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const crypto = require('crypto'); | |
// Secret key for token signing (use environment variable in production) | |
const TOKEN_SECRET = 'your-secret-key-1234567890'; | |
// Global users table with dummy users | |
let usersTable = [ | |
{ id: 1, username: 'admin', password: 'admin123', privilege: 'admin' }, | |
{ id: 2, username: 'user1', password: 'user123', privilege: 'normal' }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isValidIp(ip) { | |
const ipRegex = /^(\d{1,3}\.){3}\d{1,3}$/; | |
if (!ipRegex.test(ip)) return false; | |
return ip.split('.').every(octet => parseInt(octet) >= 0 && parseInt(octet) <= 255); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const cors = require('cors'); | |
let systemConfig = { | |
description: "Managed Switch 7.4.8", | |
objectId: "1.3.6.1.4.1.12284.1", | |
version: "Managed Switch 7.4.8", | |
interfaces: 10, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2009-2016 Realtek Semiconductor Corp. | |
* All Rights Reserved. | |
* | |
* This program is the proprietary software of Realtek Semiconductor | |
* Corporation and/or its licensors, and only be used, duplicated, | |
* modified or distributed under the authorized license from Realtek. | |
* | |
* ANY USE OF THE SOFTWARE OTHER THAN AS AUTHORIZED UNDER | |
* THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2009-2016 Realtek Semiconductor Corp. | |
* All Rights Reserved. | |
* | |
* This program is the proprietary software of Realtek Semiconductor | |
* Corporation and/or its licensors, and only be used, duplicated, | |
* modified or distributed under the authorized license from Realtek. | |
* | |
* ANY USE OF THE SOFTWARE OTHER THAN AS AUTHORIZED UNDER | |
* THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. |
NewerOlder