Files: 53607edc9f89fb0bbedc9d5cfbedaa0a2d06c9d9 / README.md
1266 bytesRaw
wpa-conf-codec
Convert wpa_supplicant.conf <-> JSON
var fs = require('fs')
var wpa = require('wpa-conf-codec')
var conf = fs.readFileSync('/etc/wpa_supplicant/wpa_supplicant.conf')
console.log(conf.decode(conf))
console.log(conf.encode(conf.decode(conf)))
API
wpa.decode(str): obj
Decode wpa config
str
: string ofwpa_supplicant.conf
dataobj
: config converted into a JS object
wpa.encode(obj): str
Encode wpa config
obj
: config as a JS objectstr
: string ofobj
converted intowpa_supplicant.conf
format
CLI
A command-line program is provided that converts between a config in
wpa_supplicant.conf
format and JSON format, using standard I/O.
wpa-conf decode
: convert conf to jsonwpa-conf encode
: convert json to conf
License
Copyright (c) 2017 @f/6sQ6d...
Usage of the works is permitted provided that this instrument is retained with the works, so that any entity that uses the works is notified of this instrument.
DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
Built with git-ssb-web