Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // import all the hacking tools and list of accounts purchased on the black market
- var terminal = require('terminal'); // login, logout, printFile, getPassword, ....
- var toolkit = require('hacker-toolkit');
- var accounts = require('blackmarket-accounts');
- //console.log(accounts);
- //console.log(terminal)
- //console.log(toolkit)
- //------- Variáveis --------------------
- var rootPassword = ''
- //---------- Percorre o array e decodifica as senhas -----
- var accountsList = accounts.map(item => (
- {
- "username": item.split(':')[0],
- 'password': toolkit.rot13(item.split(':')[1])
- })
- )
- //console.log(accountsList)
- //-------- Function brute-force --------------------
- // bruteForce function needs a terminal to hack, a list of accounts,
- // and a function to invoke when the it finds a valid account
- // the function will be invoked with a valid username and password as arguments
- // the list of accounts should be an array of account objects
- // an account object is composed by a username and password property e.g:
- // var account = {
- // username: 'mr',
- // password: 'robot'
- // };
- toolkit.bruteForce(terminal, accountsList, function(username, password) {
- //console.log('Oi eu sou a função que encontra o valor válido?',username, password);
- // login as a user
- var success = terminal.login(username, password);
- //console.log('SUCCESS ===>', success)
- if(success){
- // toolkit's spy function will watch the selected user
- // every time the user makes an action,
- // the third argument will be invoked with a description of the action as the argument
- // maybe the root user will do something useful for you to take advantage..
- toolkit.spy(terminal, 'root', (action) => {
- console.log('ACTION ==>', action)
- if(action.includes('password')){
- rootPassword = action.split(' ')[action.split(' ').length - 1]
- //console.log(rootPassword)
- terminal.logout()
- terminal.login('root', rootPassword)
- terminal.printFile('/var/logs/ecorp.txt');
- }
- });
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment