Closed sitzmoebelchronograph closed 7 years ago
Changing your Startup_Bashfile for Linux to following may fix this issue for me. But run into next.
node --use_strict vHack.js
In the main README.md file it includes documentation on what NODE version you need, the issue you had where it says "SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode" is because you used an outdated version of node. You workaround would work in this situation. And yes you are correct, the UHash string has something to do with IRC entry.
Issue
Bot does not start because of this issue:
$:~/workdir/vHackXT-MoneyBot$ LANG=en_GB ./StartBot_Linux.sh /home/foobar/workdir/vHackXT-MoneyBot/vHack.js:12 class vHackBot { // Due to API update v3, having multiple 'clients' seems to no longer be possible. ^^^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:373:25) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Function.Module.runMain (module.js:441:10) at startup (node.js:139:18) at node.js:990:3
My Operating System:
Linux 4.9.0-kali1-amd64 #1 SMP Debian 4.9.6-3kali2 (2017-01-30) x86_64 GNU/Linux Other installed deps see on following steps.
My Steps
Installing the requirements
Installing npm requirements
$:~/workdir/vHackXT-MoneyBot$ sudo npm install md5 request md5@2.2.1 node_modules/md5 ├── crypt@0.0.2 ├── charenc@0.0.2 └── is-buffer@1.1.4
request@2.79.0 node_modules/request ├── aws-sign2@0.6.0 ├── tunnel-agent@0.4.3 ├── forever-agent@0.6.1 ├── oauth-sign@0.8.2 ├── is-typedarray@1.0.0 ├── caseless@0.11.0 ├── stringstream@0.0.5 ├── aws4@1.6.0 ├── isstream@0.1.2 ├── json-stringify-safe@5.0.1 ├── extend@3.0.0 ├── uuid@3.0.1 ├── qs@6.3.1 ├── combined-stream@1.0.5 (delayed-stream@1.0.0) ├── mime-types@2.1.14 (mime-db@1.26.0) ├── tough-cookie@2.3.2 (punycode@1.4.1) ├── form-data@2.1.2 (asynckit@0.4.0) ├── hawk@3.1.3 (cryptiles@2.0.5, boom@2.10.1, sntp@1.0.9, hoek@2.16.3) ├── http-signature@1.1.1 (assert-plus@0.2.0, jsprim@1.3.1, sshpk@1.10.2) └── har-validator@2.0.6 (pinkie-promise@2.0.1, commander@2.9.0, is-my-json-valid@2.16.0, chalk@1.1.3)
Make it executable
$:~/workdir/vHackXT-MoneyBot$ chmod +x StartBot_Linux.sh
Tzzz u developed on Windows?! :-P -> ^M
$:~/workdir/vHackXT-MoneyBot$ LANG=en_GB dos2unix ./StartBot_Linux.sh dos2unix: converting file ./StartBot_Linux.sh to Unix format...
Config file is changed
Note: I Think the uHash is needed for having an invate into the irc chatroom #vhack on IRC Chat server. We could verfify if you want. { "userName": "FancyUser", "userPass": "FancyPW", "uHashStr": "This_Doesn't_Seem_To_Matter_So_Don't_Edit_This" }
Fire up da bot!
:~/workdir/vHackXT-MoneyBot$ ./StartBot_Linux.sh /home/foobar/workdir/vHackXT-MoneyBot/vHack.js:12 class vHackBot { // Due to API update v3, having multiple 'clients' seems to no longer be possible. ^^^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:373:25) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Function.Module.runMain (module.js:441:10) at startup (node.js:139:18) at node.js:990:3
Question
Whats happend :( Did you have any idea to have fun with your bot?