Hello,
Is it possible to use scripting to check if a string is contained within a .csv file?
The idea is - I've downloaded an csv database containing mac vendor identifiers, for example:
Mac Prefix,Vendor Name,Private,Block Type,Last Update
E0:2B:96,"Apple, Inc.",false,MA-L,2020/04/09
. . .
What I want to do is when an user connects to hotspot - I can strip the mac address, leaving only the first 3 pairs and check against the CSV file (using script placed in hotspot profile "On Login" - and only if the mac-address is empty (i.e. the card isn't used already) - to reduce any unnecessary checks and CPU resource waste)
If there's no match - simply disallow the user from authenticating (for example - force disconnect).
And all this because there are some cards that only permit a single device (by MAC locking), and a lot of tourists don't turn off the "Private MAC/Wi-Fi address" option when getting such a card, then after a day or two start crying on reception: "it doesn't work". So this would "force" them to turn off the setting on the first login.
The database can be found here: https://maclookup.app/downloads/csv-database
Supposedly it's frequently updated, so re-downloading it once every few days won't be an issue.
Any ideas on how to do the actual checking of the mac string against the CSV?