37 lines
775 B
JavaScript
37 lines
775 B
JavaScript
//@ts-check
|
|
const fs = require('fs')
|
|
|
|
function panic() {
|
|
console.log("/!\\ INIT PANIK /!\\ LOSE CHIBRE")
|
|
while(1) {}
|
|
}
|
|
|
|
async function main() {
|
|
try {
|
|
const initd = require('./initd.js')
|
|
const reboot = require('./reboot.js')
|
|
const { fHook } = require("./hook.js")
|
|
|
|
console.clear()
|
|
|
|
await initd()
|
|
|
|
//chainload into sheebr
|
|
if(fs.existsSync("/usr/bin/sheebr.js")) {
|
|
await fHook("/usr/bin/sheebr.js")
|
|
} else {
|
|
console.log('wrong shell path')
|
|
}
|
|
reboot.disableCtrlAltSupr()
|
|
reboot.powerOff()
|
|
|
|
console.log("End of init reached")
|
|
reboot.enableCtrlAltSupr()
|
|
panic()
|
|
} catch(e) {
|
|
console.log(e)
|
|
panic()
|
|
}
|
|
}
|
|
main()
|