#include #include #include #include $hGUI = GUICreate("Change URL", 601, 221, 192, 125) $input = GUICtrlCreateInput("", 10, 10, 380, 21) $output = GUICtrlCreateInput("", 10, 50, 380, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY)) $buttonModify = GUICtrlCreateButton("Change URL", 410, 10, 180, 30) $buttonCopy = GUICtrlCreateButton("Copy l'URL changed", 410, 50, 180, 30) $buttonOpenBrowser = GUICtrlCreateButton("Open with the browser", 410, 90, 180, 30) $buttonClear = GUICtrlCreateButton("Delete", 410, 130, 180, 30) $buttonExit = GUICtrlCreateButton("Exit", 410, 170, 180, 30) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $buttonExit ExitLoop Case $buttonModify Local $originalUrl = GUICtrlRead($input) ConsoleWrite("URL d'origine : " & $originalUrl & @CRLF) ; Trouver la position du premier chiffre dans l'URL Local $startIndex = StringInStr($originalUrl, "https://") + 4 Local $number = StringMid($originalUrl, $startIndex) ConsoleWrite("Numéro extrait : " & $number & @CRLF) ; Générer une chaîne aléatoire de 32 caractères Local $randomString = "" For $i = 1 To 32 $randomString &= Chr(Random(Asc("A"), Asc("Z"))) & Chr(Random(Asc("a"), Asc("z"))) & Chr(Random(Asc("0"), Asc("9"))) Next ConsoleWrite("Chaîne aléatoire : " & $randomString & @CRLF) ; Modifier l'URL avec les valeurs récupérées Local $modifiedUrl = "https://www1.essaiessai.frc/rss/download?id=" & $number & "&passkey=" & $randomString GUICtrlSetData($output, $modifiedUrl) Case $buttonCopy Local $modifiedUrl = GUICtrlRead($output) ClipPut($modifiedUrl) MsgBox(64, "Information", "The modified URL has been copied to the clipboard.") Case $buttonOpenBrowser Local $modifiedUrl = GUICtrlRead($output) If $modifiedUrl <> "" Then ShellExecute($modifiedUrl) Else MsgBox(16, "Error", "No modified URL was generated.") EndIf Case $buttonClear GUICtrlSetData($input, "") GUICtrlSetData($output, "") EndSwitch WEnd GUIDelete($hGUI) Exit