Spaces:
Running
Running
Download app/include/security.js from chanmin0723/obcon-scada: direct link, hf CLI and curl.
- Browser
- Download file 1.85 kB
-
https://huggingface.co/spaces/chanmin0723/obcon-scada/resolve/main/app/include/security.js
- Command line
-
hf download hf://spaces/chanmin0723/obcon-scada/app/include/security.js
-
curl -L -o security.js https://huggingface.co/spaces/chanmin0723/obcon-scada/resolve/main/app/include/security.js
1.85 kB
| /** | |
| * Copyright (c) 2017~2019, OBCon Inc. | |
| * All rights reserved. | |
| */ | |
| /** | |
| * @file | |
| * @copyright 2017~2019, OBCon Inc. | |
| * @author gye hyun james kim [pnuskgh@gmail.com] | |
| */ | |
| class Security { | |
| // checkHacking(param) { | |
| // if (!param) { | |
| // return false; | |
| // } | |
| // if ((-1 < param.indexOf(';')) || (-1 < param.indexOf('\''))) { | |
| // return true; | |
| // } | |
| // return false; | |
| // } | |
| // checkDevice(connect, callback) { | |
| // mysql_manager.scadaDeviceBySiteIdAndProductIdAndDeviceIdNotDeleted(connect.siteId, connect.productId, connect.deviceId, function(flagError, rows, err, fields) { | |
| // if (flagError) { | |
| // callback(flagError, [], err); | |
| // return; | |
| // } | |
| // if (rows.length < 1) { | |
| // callback(true, [], 'Device not exist.'); | |
| // return; | |
| // } | |
| // if (1 < rows.length) { | |
| // callback(true, [], 'Too many devices.'); | |
| // return; | |
| // } | |
| // if (connect.mac != rows[0].mac) { | |
| // callback(true, rows, 'MAC is not dismatch.'); | |
| // return; | |
| // // } else if (connect.version != rows[0].version) { | |
| // // callback(true, rows, 'Version is not dismatch.'); | |
| // // return; | |
| // } else if (rows[0].approve == 0) { | |
| // callback(true, rows, 'Not approved device.'); | |
| // return; | |
| // } else if (rows[0].approver == '') { | |
| // callback(true, rows, 'Wrong approver.'); | |
| // return; | |
| // } | |
| // callback(false, rows, null); | |
| // }); | |
| // } | |
| } | |
| module.exports = Security; | |