Visual Basic Patcher Erstellen!WIchtig!

  • VB.NET

Es gibt 18 Antworten in diesem Thema. Der letzte Beitrag () ist von Gugi.

    Visual Basic Patcher Erstellen!WIchtig!

    Hallo Leute ich möchte gerne Ein Patcher erstellen Also Das Eine Bestimmte Datei IN ein Bestimmtes Verzeichnis verschiebt


    Meine Nächste Frage ist wie kann ich ein programm machen also z.b ein Freund Schreibt Zu Mir Hallo Und Das Programm Schreibt Meine Antwort Die ich einProgrammiert Habe Zurück?



    -FIlemove
    Würdest du die Grundlagen kennen, hättest du diese Fragen nicht gestellt.

    Patcher? Nur Datei verschieben? Datei downloaden? Datei checken per MD5 oder sowas?

    2. Chatbot? Chat mit Server?

    Du musst dich schon genauer formulieren.
    Soll er die .Dll downloaden oder soll er die aus den Resourcen ziehen?

    Jetzt ist es ein Game...das ist wieder was komplett anderes...um was für ein Game handelt es sich.

    Mit Sendkeys kommste da nicht weit. Das geht nämlich eigentlich nie in DirectX Spielen.

    Und du musst ja auch irgendwie das gepostete von anderen Spielern lesen, das ist nicht einfach mal eben copy & paste.
    das was du dafür machen musst ist dasselbe wie Hacken, also wäre der Text schonmal falsch...ReadProcessMemory/WriteProcessMemory sind deine Methoden/Funktionen, dazu sollte auch hier etwas zu finden sein...
    Ich wollte auch mal ne total überflüssige Signatur:
    ---Leer---

    VB.NET-Quellcode

    1. Module Module1
    2. #region "Declarations"
    3. Private Declare Function OpenProcess Lib "kernel32" Alias "OpenProcess" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer
    4. Private Declare Function WriteProcessMemory Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
    5. Private Declare Function WriteFloatMemory Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Single, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
    6. Private Declare Function ReadFloat Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByRef buffer As Single, ByVal size As Int32, ByRef lpNumberOfBytesRead As Int32) As Boolean
    7. Private Declare Function ReadProcessMemory Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
    8. Private Declare Function CloseHandle Lib "kernel32" Alias "CloseHandle" (ByVal hObject As Integer) As Integer
    9. Private string1 As Long
    10. Private string2 As Integer
    11. Private RBuff1 As Long
    12. Private RBuff2 As Single
    13. Private RBuff3 As Integer
    14. #end region
    15. #Region "Check Process/ReadDll"
    16. Private Function readdll(ByVal modulename As String)
    17. Dim procmodule As ProcessModule
    18. Dim constant1 As Integer
    19. Dim constant2 As Long
    20. Dim constant3 As Process() = Process.GetProcessesByName("iw4mp")
    21. If constant3.Length = 0 Then
    22. Return 0
    23. End If
    24. For Each procmodule In constant3(0).Modules
    25. If modulename = procmodule.ModuleName Then
    26. constant1 = procmodule.BaseAddress
    27. End If
    28. Next
    29. constant2 = constant1
    30. Return constant2
    31. End Function
    32. Public Function IsProcessOpen(ByVal name As String) As Boolean
    33. For Each clsProcess As Process In Process.GetProcesses
    34. If clsProcess.ProcessName.Contains(name) Then
    35. Return True
    36. End If
    37. Next
    38. ' Do nothing
    39. Return False
    40. End Function
    41. #end region
    42. #Region "Hacks"
    43. 'WriteMemory
    44. Private Function WriteMemory(ByVal Address As Integer, ByVal Value As Long, ByVal Bytes As Integer)
    45. Dim iw4mpLookUp As Process() = Process.GetProcessesByName("iw4mp")
    46. If iw4mpLookUp.Length = 0 Then
    47. End
    48. End If
    49. Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, iw4mpLookUp(0).Id)
    50. WriteProcessMemory(processHandle, Address, Value, Bytes, Nothing)
    51. CloseHandle(processHandle)
    52. Return Nothing
    53. End Function
    54. 'WriteFloat
    55. Private Function WriteFloat(ByVal Address As Integer, ByVal Value As Single)
    56. Dim iw4mpLookUp As Process() = Process.GetProcessesByName("iw4mp")
    57. If iw4mpLookUp.Length = 0 Then
    58. End
    59. End If
    60. Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, iw4mpLookUp(0).Id)
    61. WriteFloatMemory(processHandle, Address, Value, 4, Nothing)
    62. CloseHandle(processHandle)
    63. Return Nothing
    64. End Function
    65. 'NOP
    66. Private Function NOP(ByVal Address As Integer, ByVal value As Integer)
    67. Dim iw4mpLookUp As Process() = Process.GetProcessesByName("iw4mp")
    68. If iw4mpLookUp.Length = 0 Then
    69. End
    70. End If
    71. Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, iw4mpLookUp(0).Id)
    72. WriteProcessMemory(processHandle, Address, value, 1, Nothing)
    73. CloseHandle(processHandle)
    74. Return Nothing
    75. End Function
    76. #End region
    77. #Region "Functions"
    78. Public Function memoryh4x(ByVal address As String, ByVal value As Long, ByVal bytes As Byte)
    79. If IsProcessOpen("iw4mp") Then
    80. string1 = readdll("cshell.dll")
    81. string2 = "&H" & Hex(string1 + address)
    82. WriteMemory(string2, value, bytes)
    83. End If
    84. Return Nothing
    85. End Function
    86. Public Function floath4x(ByVal address As String, ByVal value As Long)
    87. If IsProcessOpen("iw4mp") Then
    88. string1 = readdll("cshell.dll")
    89. string2 = "&H" & Hex(string1 + address)
    90. WriteFloat(string2, value)
    91. End If
    92. Return Nothing
    93. End Function
    94. Public Function noph4x(ByVal address As String, ByVal value As Long)
    95. If IsProcessOpen("iw4mp") Then
    96. string1 = readdll("cshell.dll")
    97. string2 = "&H" & Hex(string1 + address)
    98. NOP(string2, value)
    99. End If
    100. Return Nothing
    101. End Function
    102. #end region
    103. End Module


    VB.NET-Quellcode

    1. memoryh4x(&H12BC89F, 1337, 4)


    Zum lesen ist da nun keine Funktion drinne, das kannst du ja mal selbst probieren...

    Hat das nicht irgendwas mit Packets zu tun?

    Genau weiß ich es nicht...
    Beim Webclient hast du dann auch die Möglichkeiten den aktuellen Status herauszulesen. Außerdem gibt es ein Event dafür, wenn der Download abgeschlossen ist.

    My.Computer.Network.Downloadfile ist ungenau und ich würde es niemandem empfehlen.

    Fazit: Benutz einen Webclient. Bevor du fragst wie, versuch es doch erst einmal selbst...
    Damit meinte ich, dass du nicht weißt, wann der Download fertig ist. Du kannst natürlich bei kleinen Dateien einfach Sleep einbauen, trotzdem...

    Da bevorzuge ich doch eher den webclient. Oder kann man bei Computer.Network den Progress mit Handlern irgendwie ablesen?

    Naja egal, ich bin mal pennen. Wenn alles was ich sage Müll ist, liegt es daran, dass ich sau müde bin :pinch:

    Bisschen schlecht formuliert.
    My-Download...hat zwar weder Events noch eine sonstige benachrichtigung, jedoch erfolgt der Download im GUI Thread, somit wird auch keine Benachrichtigung benötigt, der Download ist fertig, sobald die nächste Zeile Code ausgeführt wird...


    BTT:msdn.microsoft.com/de-de/libra…bclient.downloadfile.aspx
    Ich wollte auch mal ne total überflüssige Signatur:
    ---Leer---

    MoonMen2010 schrieb:

    Kapier Ich Garnicht Kann ich nicht Einfach:

    VB.NET-Quellcode

    1. my.computer.downloadfile("Mein FTP")

    nein kannst du nicht!
    wenn du es so machen willst gehts so:

    VB.NET-Quellcode

    1. my.computer.network.downloadfile("Mein FTP")


    aber besser siehts so aus:

    VB.NET-Quellcode

    1. dim client as new net.webclient
    2. client.downloadfile("Mein FTP", "Pfad und Dateiname")

    wenn der pfad der startpfad der datei sein soll musst du es mit application.startuppath machen.

    lg Gugi