npm install keythereum
npm install web3
.datadir need to correct.
UTC/keystore/UTC--2019-03-25T09-10-35.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
.address need correct "0xooooooooooooooooooooooooo"
.password need correct, this example is empty.
.web3 localhost is fake, don't need have geth.
var keythereum = require("keythereum");
var datadir = "UTC";
var address= "0xooooooooooooooooooooooooo";
const password = "";
var keyObject = keythereum.importFromFile(address, datadir);
var privateKey = keythereum.recover(password, keyObject);
console.log(privateKey.toString('hex'));
Web3 = require('web3')
web3 = new Web3(new Web3.providers.HttpProvider("localhost"));
var address = web3.eth.accounts.privateKeyToAccount("0x"+privateKey.toString('hex'));
console.log(address);