Hallo Epvp Community, heute release ich ein Packet Converter Tool.
Ihr habt die Möglichkeit das Format beliebig einzustellen.
Eine Black b.z.w Whitelist ist auch vorhanden.
Formate könnt ihr auch speichern und laden.
Ihr habt die Möglichkeit das Format beliebig einzustellen.
Eine Black b.z.w Whitelist ist auch vorhanden.
Formate könnt ihr auch speichern und laden.
Example Packet
| in | 3 | 333 | 1820 | 79 | 34 | 2 | 100 | 100 | 0 | 0 | 0 | -1 | 1 | 0 | -1 | - | 0 | -1 | 0 | 0 | 0 | 0 | 0 | 0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| %1 | %2 | %3 | %4 | %5 | %6 | %7 | %8 | %9 | %10 | %11 | %12 | %13 | %14 | %15 | %16 | %17 | %18 | %19 | %20 | %21 | %22 | %23 | %24 | %25 |
| Example Format |
|---|
| VNUM=%3 |
| X=%5 |
| Y=%6 |
| Direction=%7 |
Include liegt in der zip Datei
Code:
#include <EzMySql.au3>
Global Const $formatPath = @ScriptDir & "\formats\"
#Region ### START Koda GUI section ### Form=
$hGUI = GUICreate("[BladeTiger12] - Packet Converter", 613, 458, -1, -1)
$idPackets = GUICtrlCreateEdit("", 80, 8, 529, 105)
GUICtrlSetData(-1, "")
$idLblPackets = GUICtrlCreateLabel("Packets:", 8, 8, 46, 17)
$idConvert = GUICtrlCreateButton("Convert", 8, 410, 279, 23)
$idConvertToDb = GUICtrlCreateButton("Convert to Database", 325, 410, 279, 23)
$idHelpDB = GUICtrlCreateButton("Help DB Convert", 325, 435, 95, 20)
$idLblFormat = GUICtrlCreateLabel("Format:", 8, 128, 55, 17)
$idFormat = GUICtrlCreateEdit("", 144, 120, 465, 145)
GUICtrlSetData(-1, StringFormat(""))
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$idLblFilter = GUICtrlCreateLabel("Packet Filter:", 8, 296, 66, 17)
$idFilter = GUICtrlCreateEdit("mv", 80, 296, 529, 97)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$idBlacklist = GUICtrlCreateRadio("Blacklist", 80, 272, 81, 17)
GUICtrlSetState(-1, 1)
$idWhitelist = GUICtrlCreateRadio("Whitelist", 176, 272, 73, 17)
$idSaveFormat = GUICtrlCreateButton("Save", 8, 224, 131, 25)
$idFormatList = GUICtrlCreateCombo("", 8, 160, 129, 25, BitOR(0x3,0x40))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
UpdateFormatList()
While True
Switch GUIGetMsg()
Case -3
For $i = 255 To 0 Step -6
WinSetTrans($hGUI, "", $i)
Sleep(1)
Next
Exit
Case $idConvert
Convert(StringSplit(GUICtrlRead($idPackets), @CRLF, 2), GUICtrlRead($idFormat), StringSplit(GUICtrlRead($idFilter), @LF, 2), 1)
Case $idSaveFormat
SaveFormat(GUICtrlRead($idFormat))
Case $idFormatList
SelectFormat(GUICtrlRead($idFormatList))
Case $idHelpDB
MsgBox(64, "DB Convert Help", "Format:" & @CRLF & "Columnname=%1" & @CRLF & "Columname1=%2" & @CRLF & @CRLF & "Like that: " & @CRLF & "Name=%1" & @CRLF & "Level=%2" & @CRLF & "X=%3" & @CRLF & "...")
Case $idConvertToDb
Convert(StringSplit(GUICtrlRead($idPackets), @CRLF, 2), GUICtrlRead($idFormat), StringSplit(GUICtrlRead($idFilter), @LF, 2), 2)
EndSwitch
WEnd
Func SelectFormat($fileName)
If Not FileExists($formatPath & $fileName) Then
MsgBox(16, "File", "File doesn't exist!")
Return
EndIf
GUICtrlSetData($idFormat, FileRead($formatPath & $fileName))
EndFunc
Func UpdateFormatList()
Local $findFile = FileFindFirstFile($formatPath & "*.*")
If $findFile = -1 Then Return
Local $bFirstFile = True
While True
Local $findNextFile = FileFindNextFile($findFile)
If @error Then ExitLoop
GUICtrlSetData($idFormatList, $findNextFile)
WEnd
ControlCommand($hGUI, "", $idFormatList, "SetCurrentSelection", 0)
EndFunc
Func SaveFormat($sFormat)
If $sFormat = "" Then Return
Local $fileName = InputBox("Format-Name", "Write format name.")
If @error or $fileName = "" Then Return
$return = StringRegExp($fileName, "^[A-Za-z0-9_ -\.]+$", 0)
If Not $return Then
MsgBox(16, "Filename", "Select other filename!")
Return
EndIf
If FileExists($formatPath & $fileName) Then
If MsgBox(64 + 4, "Exists already", "File " & $fileName & " exists already! Overwrite?") = 7 Then
Return
EndIf
EndIf
Local $file = FileOpen($formatPath & $fileName, 2)
FileWrite($file, $sFormat)
FileClose($file)
UpdateFormatList()
EndFunc
Func Convert($aConvert, $sFormat, $aFilter, $Type)
If $Type = 1 Then
Local $hFile = FileOpen("packet_result.txt", 2)
For $i = 0 To UBound($aConvert) -1
If $aConvert[$i] = "" Or StringReplace($aConvert[$i], " ", "") = "" Then ContinueLoop
Local $aParams = StringSplit($aConvert[$i], " ", 2)
If Not IsArray($aParams) Or UBound($aParams) = 0 Then ContinueLoop
If $aParams[0] = "" Then ContinueLoop
If CheckFilter($aFilter, $aParams[0]) Then ContinueLoop
Local $curFormat = $sFormat
For $j = 0 To UBound($aParams) -1
$curFormat = StringReplace($curFormat, "%" & $j + 1, $aParams[$j])
Next
FileWrite($hFile, $curFormat & @CRLF)
Next
FileClose($hFile)
ElseIf $Type = 2 Then
Local $dbData = InputBox("Db data", "Write in Format like this: Host#user#password#database#table")
If @error Or $dbData = "" Then Return
Local $aDBData = StringSplit($dbData, "#", 2)
If UBound($aDBData) < 5 Then
MsgBox(16, "Error", "Wrong DB data!")
Return
EndIf
Local $aFormat = StringSplit($sFormat, @CRLF, 2)
MySql_Startup()
If Not MySql_Open($aDBData[0], $aDBData[1], $aDBData[2], $aDBData[3]) Then
MsgBox(16, "MySQL Error", "Error: " & @CRLF & MySql_ErrMsg())
Else
Local $stdSqlQuery = "INSERT INTO " & $aDBData[4] & "(", $sArgValue = ""
For $i = 0 To UBound($aFormat) -1
If $aFormat[$i] = "" Then ContinueLoop
Local $split = StringSplit($aFormat[$i], "=", 2)
If Not IsArray($split) Or UBound($split) <> 2 Then ContinueLoop
$stdSqlQuery &= $split[0] & ", "
$sArgValue &= "'" & $split[1] & "'"
$sArgValue &= ", "
Next
$stdSqlQuery = StringTrimRight($stdSqlQuery, 2) & ") VALUES(" & StringTrimRight($sArgValue, 2) & ")"
For $i = 0 To UBound($aConvert) -1
If $aConvert[$i] = "" Or StringReplace($aConvert[$i], " ", "") = "" Then ContinueLoop
Local $aParams = StringSplit($aConvert[$i], " ", 2)
If Not IsArray($aParams) Or UBound($aParams) = 0 Then ContinueLoop
If $aParams[0] = "" Then ContinueLoop
If CheckFilter($aFilter, $aParams[0]) Then ContinueLoop
Local $curFormat = $stdSqlQuery
For $j = 0 To UBound($aParams) -1
$curFormat = StringReplace($curFormat, "%" & $j + 1, $aParams[$j])
Next
MySql_Exec($curFormat)
Next
EndIf
MySql_Close()
MySql_Shutdown()
EndIf
EndFunc
Func CheckFilter(ByRef $aFilter, $sHeader)
Local $isBlacklistChecked = (GUICtrlRead($idBlacklist) = 1) ? True : False
For $i = 0 To UBound($aFilter) -1
If $isBlacklistChecked Then
If $aFilter[$i] = $sHeader Then Return True
Else
If $aFilter[$i] = $sHeader Then Return False
EndIf
Next
If Not $isBlacklistChecked Then Return True
Return False
EndFunc
Version 5:
- You can convert now to db.
Version 4.1:
- Converting bug fixed (Ty to xSensitivex)
Version 4:
- Little bug fix(Converting)
Version 3:
- Formatlist added
Version 2:
- Black/Whitelist added
Version 1:
- Released
- You can convert now to db.
Version 4.1:
- Converting bug fixed (Ty to xSensitivex)
Version 4:
- Little bug fix(Converting)
Version 3:
- Formatlist added
Version 2:
- Black/Whitelist added
Version 1:
- Released
Download im Anhang.
Virustotal:






