Advertisement
Guest User

Untitled

a guest
Jan 28th, 2017
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.10 KB | None | 0 0
  1. Imports System.Net
  2. Imports System.IO
  3. Imports System.Net.Mail
  4.  
  5. Public Class Form1
  6.  
  7. '
  8. '
  9. ' ⟩ Copyright © ⇒ MrDarkSkil © ⟨
  10. ' ⟩ 2014 ⇒ 2015 ⟨
  11. '
  12. ' Launcher create for Emodyz©
  13. ' and
  14. ' AltisDev.com
  15. '
  16. ' Ne pas changer les crédits !
  17. '
  18.  
  19.  
  20. ' Merci de bien vouloir ne pas changer les crédits de base qui ce trouve plus bas dans le code ( sinon votre launcher seras inutilisable ! )
  21.  
  22.  
  23. ' Important, A changer !
  24. Public ftp = "http://tutolauncher.esy.es/" ' Serveur ou ce trouve tout les fichier nessésaire au launcher
  25. Public servername = "TuToLauncher'Life"
  26. Public modsname = "@TuTuLauncher" 'Config Arma 3 'Config site web // forum
  27. Public website = "http://tutolauncher.esy.es/" 'Le lien de votre site, forum ou autres
  28. Public ipserveur = "mon.ipserveur.com:port" 'Ip de votre serveur arma3
  29. Public servpassword = "none" 'Mot de passe de votre serveur ( préférable contre les hacks ! )
  30.  
  31. 'Config TeamSpeak
  32. Public ipTS = "ts3.monip.com" ' Ip de votre teamspeak ( sans les port " 0.0.0.127:25564 vous mettez juste sa 0.0.0.127 "
  33. Public portTS = "none" 'Le port de votre teamspeak ( si vous n'en avez pas mettez " none " )
  34.  
  35. 'Config launcher
  36. Public extention = "TuTu.exe" 'Mettez le nom que votre launcher auras en .exe ( "exemple: emodyz.exe ") puis uploader le launcher sur le FTP
  37. Public TaskForce = "Disable" 'PAS ENCORE OPERATIONNEL ! 'Mettez si oui ou non la possiblilité d'installer TaskForce est disponible ( "Enable" = Activé "Disable" = Désactivé )
  38.  
  39. 'Non des fichier qui donne des infos au launcher !
  40. Public listmods = "modspack.txt" 'Liste des mods
  41. Public message = "news.txt" 'Les news du launcher
  42. Public deletepack = "deletepack.txt" 'Le pack pour surprimer les mods
  43. Public modcpp = "mod.cpp" 'Le mod.cpp
  44. Public logocpp = "logo.paa" 'Le logo.paa
  45.  
  46. 'Crédits (Vous ne pouvez qu'ajouter votre nom ici et le nom de votre serveur, NE PAS CHANGER LES CREDITS QUI ME SONT PROPRES ! )
  47. Dim crédits = "Modifié par: VotreNomIci " & vbNewLine & "Pour le serveur: " & servername
  48.  
  49. 'information Version
  50. Public vlauncher = "vlauncher.txt" ' Le fichier ou est inscript la dernière version du launcher
  51.  
  52. 'info adresse email
  53. Public email = "leohub@live.fr" 'Votre adresse email ( pour recevoir les allerts de cheat !)
  54.  
  55. 'Direction utiles
  56. Public dmods = "mods" ' la direction sur le ftp ou les mods sont upload
  57. Public dcpp = "cpp" ' la direction sur le ftp ou le mod.cpp et logo.paa sont upload
  58. Public dversion = "version" 'la direction ou tout les fichier renseignant les version à savoir sont
  59. Public dlauncher As String = Application.StartupPath & "\" ' Ne pas changer !!
  60. Public darma3 As String = "C:\Program Files (x86)\Steam\SteamApps\common\Arma 3\" 'La destination de base ou ce cache peu être arma3
  61.  
  62. 'Option Launcher
  63. Public startoption = "-skipIntro" 'Option de lancement de base ( NE PAS CHANGER !)
  64. Public speudo = "NewUser" 'Speudo de base ( NE PAS CHANGER !)
  65.  
  66. 'Information anex ( Ne pas changer )
  67. Public vlaunch As String = Application.ProductVersion ' NE PAS CHANGER
  68. Public newsmessage As String = "Chargement..." 'NE PAS CHANGER
  69. Public appdata As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\" & servername & "\" ' Destination ou le launcher a besoin de mettre les fichier.
  70. Public user As String = Environment.UserName 'Detecte le nom d'utilisateur du PC
  71. Public internet As String 'NE PAS CHANGER
  72.  
  73. ' Congiguration sensible ! ( Don't Touch ) ( NE PAS TOUCHER )
  74. Dim nbr_ligne As Integer = 0
  75. Dim ligne As String
  76. Dim tligne As String
  77. Dim totalBytes As Double
  78. Dim bytesIn As Double
  79. Dim AntiCheatRead
  80. Dim bytes As Integer
  81. Dim download = "defalt"
  82. Dim nbrdownload = "0"
  83. Dim nbr_delete = "0"
  84. Dim clock
  85. Dim deletel
  86. Dim tdelete
  87. Dim finish = "false"
  88. Dim dfinish = "false"
  89.  
  90.  
  91. Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  92. '
  93. '
  94. ' ⟩ Copyright © ⇒ MrDarkSkil © ⟨
  95. ' ⟩ 2014 ⇒ 2015 ⟨
  96. '
  97. ' Launcher create for Emodyz©
  98. ' and
  99. ' AltisDev
  100. '
  101. ' Ne pas changer les crédits !
  102. '
  103.  
  104. PictureBox3.Visible = False
  105. PictureBox7.Visible = False
  106. If My.Computer.FileSystem.FileExists("UP.exe") Then
  107. My.Computer.FileSystem.DeleteFile("UP.exe")
  108. End If
  109. If My.Computer.FileSystem.FileExists("site.txt") Then
  110. My.Computer.FileSystem.DeleteFile("site.txt")
  111. End If
  112.  
  113. If My.Computer.FileSystem.FileExists("update.txt") Then
  114. My.Computer.FileSystem.DeleteFile("update.txt")
  115. End If
  116. If My.Computer.FileSystem.FileExists(appdata & "startoption.a3") Then
  117. startoption = My.Computer.FileSystem.ReadAllText(appdata & "startoption.a3")
  118. End If
  119.  
  120. If My.Computer.FileSystem.FileExists(appdata & "speudo.a3") Then
  121. speudo = My.Computer.FileSystem.ReadAllText(appdata & "speudo.a3")
  122. End If
  123. My.Computer.FileSystem.CreateDirectory(appdata)
  124. ' Change les textes perssonalisé du launcher
  125. FormSkin1.Text = " " & servername
  126. FlatLabel1.Text = "v. " & vlaunch
  127. ' Demande le choix de la destination Arma3
  128. If My.Computer.FileSystem.FileExists(appdata & "destination.a3") Then
  129. darma3 = My.Computer.FileSystem.ReadAllText(appdata & "destination.a3")
  130. If My.Computer.FileSystem.FileExists(darma3 & "arma3.exe") Then
  131. Else
  132. MsgBox("La destination d'arma3 n'est pas valide !" & vbNewLine & "Avant de télécharger les mods, veillez à bien rechoisir la destination !")
  133. End If
  134. Else
  135. If My.Computer.FileSystem.FileExists(darma3 & "arma3.exe") Then
  136. darma3 = ("C:\Program Files (x86)\Steam\SteamApps\common\Arma 3\")
  137. Else
  138. Folder.ShowDialog()
  139. darma3 = Folder.SelectedPath & "\"
  140. My.Computer.FileSystem.WriteAllText(appdata & "destination.a3", darma3, False)
  141. End If
  142. If My.Computer.FileSystem.FileExists(darma3 & "arma3.exe") Then
  143. Else
  144. MsgBox("La destination choisi n'est pas valide !")
  145. End If
  146. End If
  147. FlatLabel2.Text = ("Destination d'Arma3: " & darma3)
  148. ' On run les news, mise à jour
  149. If My.Computer.Network.IsAvailable Then
  150. DownloadOther.RunWorkerAsync()
  151. News.RunWorkerAsync()
  152. Else
  153. FlatButton1.Enabled = False
  154. FlatStatusBar1.Text = "Erreur: Vous n'avez pas internet !"
  155. End If
  156.  
  157.  
  158. End Sub
  159.  
  160. Private Sub News_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles News.DoWork
  161. 'System de news ( chargement du message )
  162.  
  163. Do
  164.  
  165. Dim newsstream As String = ftp & message
  166.  
  167. Dim clientnews As WebClient = New WebClient()
  168. Dim reader As StreamReader = New StreamReader(clientnews.OpenRead(newsstream))
  169. Dim messagerequest = reader.ReadLine
  170. Dim maintenance = reader.ReadLine
  171.  
  172.  
  173.  
  174. If maintenance = "1" Then
  175. newsmessage = "Maintenance en cour !"
  176. PictureBox7.Visible = True
  177. PictureBox7.BringToFront()
  178. FlatButton1.Enabled = False
  179. Else
  180. newsmessage = "Message du staff: " & messagerequest
  181. PictureBox7.Visible = False
  182. FlatButton1.Enabled = True
  183.  
  184. End If
  185.  
  186.  
  187. FlatStatusBar1.Text = newsmessage
  188.  
  189. If maintenance = "0" Then
  190. Exit Sub
  191. End If
  192. Threading.Thread.Sleep(10000)
  193. Loop
  194.  
  195.  
  196. End Sub
  197.  
  198. Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
  199. Process.Start(website)
  200. End Sub
  201.  
  202. Private Sub FlatButton2_Click(sender As Object, e As EventArgs) Handles FlatButton2.Click
  203. If user = "MrDarkSkil" Then
  204. MsgBox("C'est ton launcher gros :D")
  205. End If
  206.  
  207. MsgBox("Launcher crée par Hubert Léo alias MrDarkSkil" & vbNewLine & vbNewLine & "Pour la communauté Emodyz.com et AltisDev.com" & vbNewLine & vbNewLine & crédits, MsgBoxStyle.Information)
  208. End Sub
  209.  
  210. Private Sub FlatButton3_Click(sender As Object, e As EventArgs) Handles FlatButton3.Click
  211. Process.Start(website)
  212. End Sub
  213.  
  214. Private Sub FlatButton4_Click(sender As Object, e As EventArgs) Handles FlatButton4.Click
  215. If portTS = "none" Then
  216. Process.Start("ts3server://" & ipTS)
  217. Else
  218. Process.Start("ts3server://" & ipTS & "?port=" & portTS)
  219. End If
  220. End Sub
  221.  
  222. Private Sub FlatButton5_Click(sender As Object, e As EventArgs) Handles FlatButton5.Click
  223. Folder.ShowDialog()
  224. darma3 = Folder.SelectedPath & "\"
  225. FlatLabel2.Text = ("Destination d'Arma3: " & darma3)
  226.  
  227. If My.Computer.FileSystem.FileExists(darma3 & "arma3.exe") Then
  228. Else
  229. MsgBox("La destination d'arma3 choisi n'est pas valide !")
  230. End If
  231. If My.Computer.FileSystem.FileExists(appdata & "destination.a3") Then
  232. My.Computer.FileSystem.DeleteFile(appdata & "destination.a3")
  233. End If
  234. My.Computer.FileSystem.WriteAllText(appdata & "destination.a3", darma3, False)
  235. End Sub
  236.  
  237.  
  238. Private Sub FlatButton1_Click(sender As Object, e As EventArgs) Handles FlatButton1.Click
  239.  
  240. If finish = "false" Then
  241. MsgBox("Veuillez patienter quelques secondes le temps que le launcher télécharge tout ce dont il a besoin !")
  242. Exit Sub
  243. End If
  244. If My.Computer.FileSystem.FileExists(darma3 & "arma3.exe") Then
  245. If dfinish = "false" Then
  246. 'Crée le dossier dans lequel les mods vont se télécharger
  247. My.Computer.FileSystem.CreateDirectory(darma3 & modsname)
  248.  
  249. 'lance le téléchargement des mods
  250. Downloadmods.RunWorkerAsync()
  251.  
  252. 'bloque le bouton
  253. PictureBox2.Visible = False
  254.  
  255. 'télécharge les trucs .cpp
  256. DownloadCpp.RunWorkerAsync()
  257. Else
  258. StartArma.RunWorkerAsync()
  259. End If
  260.  
  261. Else
  262. MsgBox("La destination d'arma3 n'est pas valide !" & vbNewLine & "Avant de télécharger les mods, veillez à bien rechoisir la destination !")
  263. Exit Sub
  264. End If
  265. End Sub
  266. Private Sub client_ProgressChanged(ByVal sender As Object, ByVal e As DownloadProgressChangedEventArgs)
  267.  
  268. bytesIn = Double.Parse(e.BytesReceived.ToString())
  269.  
  270. totalBytes = Double.Parse(e.TotalBytesToReceive.ToString())
  271.  
  272. Dim percentage As Double = bytesIn / totalBytes * 100
  273.  
  274. If download = "true" Then
  275. FlatLabel6.Text = "Téléchargement du mod: " & ligne
  276. End If
  277.  
  278. If download = "false" Then
  279. FlatLabel6.Text = "Vérification du mod: " & ligne
  280. End If
  281.  
  282. FlatProgressBar1.Value = Int32.Parse(Math.Truncate(percentage).ToString())
  283. End Sub
  284.  
  285. Private Sub client_DownloadCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs)
  286. nbr_ligne += 1
  287.  
  288. If download = "true" Then
  289. nbrdownload += 1
  290. FlatLabel3.Text = "Mod(s) total à télécharger: " & tligne & " Mod(s)"
  291. FlatLabel4.Text = "Mod(s) Restant: " & tligne - nbr_ligne & " Mod(s)"
  292. FlatLabel5.Text = "Mod(s) Téléchargé: " & nbrdownload & " Mod(s)"
  293. End If
  294.  
  295. If download = "false" Then
  296. FlatLabel3.Text = "Mod(s) à Vérifié: " & tligne & " Mod(s)"
  297. FlatLabel4.Text = "Mod(s) Vérifié: " & nbr_ligne & " Mod(s)"
  298. End If
  299.  
  300.  
  301. FlatProgressBar2.Value = nbr_ligne * 100 / tligne
  302.  
  303. If FlatProgressBar2.Value = 100 Then
  304. 'Start arma 3
  305. dfinish = "true"
  306. PictureBox2.Visible = True
  307. StartArma.RunWorkerAsync()
  308. Else
  309. Downloadmods.Dispose()
  310. Pont.RunWorkerAsync()
  311. End If
  312. End Sub
  313.  
  314. Private Sub Downloadmods_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles Downloadmods.DoWork
  315. 'Crée la liste des mods à télécharger
  316. If My.Computer.FileSystem.FileExists(appdata & listmods) Then
  317. Dim line As String() = File.ReadAllLines(appdata & listmods)
  318. ligne = line(nbr_ligne)
  319. tligne = line.Length
  320.  
  321. Else
  322. MsgBox("Une erreur est survenue ! " & vbNewLine & vbNewLine & "Veuillez réessayer plus tard ou conctacter le créateur du launcher" & vbNewLine & "sur http://emodyz.com/forum , son speudo ""Jason Statam""ou ""MrDarkSkil""")
  323. End If
  324.  
  325. 'Savoir la taille d'un fichier en ligne
  326. Dim Request As System.Net.WebRequest
  327. Dim Response As System.Net.WebResponse
  328. Dim FileSize As Integer
  329. Request = Net.WebRequest.Create(ftp & dmods & "/" & ligne)
  330. Request.Method = Net.WebRequestMethods.Http.Get
  331. Response = Request.GetResponse
  332. FileSize = Response.ContentLength
  333.  
  334. If My.Computer.FileSystem.FileExists(darma3 & modsname & "\addons\" & ligne) Then
  335. Dim infoReader As System.IO.FileInfo
  336. infoReader = My.Computer.FileSystem.GetFileInfo(darma3 & modsname & "\addons\" & ligne)
  337. bytes = infoReader.Length
  338.  
  339. End If
  340.  
  341.  
  342.  
  343.  
  344. Dim Client As WebClient = New WebClient
  345.  
  346. AddHandler Client.DownloadProgressChanged, AddressOf client_ProgressChanged
  347.  
  348. AddHandler Client.DownloadFileCompleted, AddressOf client_DownloadCompleted
  349.  
  350.  
  351.  
  352. If bytes = FileSize Then
  353. download = "false"
  354. If My.Computer.FileSystem.FileExists(darma3 & "copyright.txt") Then
  355. My.Computer.FileSystem.DeleteFile(darma3 & "copyright.txt")
  356. End If
  357. Client.DownloadFileAsync(New Uri(ftp & "copyright.txt"), darma3 & "copyright.txt")
  358. Else
  359. download = "true"
  360. My.Computer.FileSystem.CreateDirectory(darma3 & modsname & "\addons\")
  361. If My.Computer.FileSystem.FileExists(darma3 & modsname & "\addons\" & ligne) Then
  362. My.Computer.FileSystem.DeleteFile(darma3 & modsname & "\addons\" & ligne)
  363. End If
  364. Client.DownloadFileAsync(New Uri(ftp & dmods & "/" & ligne), darma3 & modsname & "\addons\" & ligne)
  365. End If
  366. Response.Close()
  367. Exit Sub
  368. End Sub
  369.  
  370. Private Sub DownloadOther_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles DownloadOther.DoWork
  371.  
  372. '
  373. '
  374. ' ⟩ Copyright © ⇒ MrDarkSkil © ⟨
  375. ' ⟩ 2014 ⇒ 2015 ⟨
  376. '
  377. ' Launcher create for Emodyz©
  378. ' and AltisDev.com
  379. '
  380. ' Ne pas changer les crédits !
  381. '
  382.  
  383.  
  384. ' Download la liste des mods
  385. If My.Computer.FileSystem.FileExists(appdata & listmods) Then
  386. My.Computer.FileSystem.DeleteFile(appdata & listmods)
  387. End If
  388. My.Computer.Network.DownloadFile(ftp & listmods, appdata & listmods)
  389.  
  390.  
  391.  
  392. ' Download la liste des des mods à supprimer
  393. If My.Computer.FileSystem.FileExists(appdata & deletepack) Then
  394. My.Computer.FileSystem.DeleteFile(appdata & deletepack)
  395. End If
  396. My.Computer.Network.DownloadFile(ftp & deletepack, appdata & deletepack)
  397.  
  398.  
  399. ' Download la dernière version du launcher
  400. If My.Computer.FileSystem.FileExists(appdata & dversion & "\" & vlauncher) Then
  401. My.Computer.FileSystem.DeleteFile(appdata & dversion & "\" & vlauncher)
  402. End If
  403. My.Computer.Network.DownloadFile(ftp & dversion & "\" & vlauncher, appdata & dversion & "\" & vlauncher)
  404.  
  405.  
  406. ' Verifie si le launcher est à jour, si non il fait la mise à jour.
  407. If My.Computer.FileSystem.FileExists(appdata & dversion & "\" & vlauncher) Then
  408. Dim v = My.Computer.FileSystem.ReadAllText(appdata & dversion & "\" & vlauncher)
  409. If v = vlaunch Then
  410. Else
  411. FlatButton1.Enabled = False
  412. UpdateLauncher.RunWorkerAsync()
  413. End If
  414. Else
  415. MsgBox("Une erreur est survenue ! " & vbNewLine & vbNewLine & "Veuillez réessayer plus tard ou conctacter le créateur du launcher" & vbNewLine & "sur http://emodyz.com/forum , son speudo ""Jason Statam""ou ""MrDarkSkil""")
  416. End If
  417. finish = "true"
  418. AntiCheat.RunWorkerAsync()
  419. End Sub
  420.  
  421. Private Sub UpdateLauncher_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles UpdateLauncher.DoWork
  422. MsgBox("Une mise du launcher est disponible !" & vbNewLine & vbNewLine & "Cliquer sur ""Ok"" pour continuer !", vbInformation)
  423. If My.Computer.FileSystem.FileExists(appdata & "Update.exe") Then
  424. My.Computer.FileSystem.DeleteFile(appdata & "Update.exe")
  425. End If
  426. If My.Computer.FileSystem.FileExists(appdata & "update.txt") Then
  427. My.Computer.FileSystem.DeleteFile(appdata & "update.txt")
  428. End If
  429. If My.Computer.FileSystem.FileExists(appdata & "site.txt") Then
  430. My.Computer.FileSystem.DeleteFile(appdata & "site.txt")
  431. End If
  432. My.Computer.Network.DownloadFile(ftp & "Update.exe", appdata & "Update.exe")
  433. My.Computer.FileSystem.WriteAllText(appdata & "update.txt", Application.ExecutablePath, False)
  434. My.Computer.FileSystem.WriteAllText(appdata & "site.txt", ftp & extention, False)
  435. Process.Start(appdata & "Update.exe")
  436. Me.Close()
  437.  
  438. End Sub
  439. Private Sub AntiCheat_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles AntiCheat.DoWork
  440.  
  441. '
  442. ' Anticheat ne pas toucher, mise à jour de l'auticheate automatique ( sans mêtre à jour le launcher )
  443. '
  444. '
  445. ' ⟩ Copyright © ⇒ MrDarkSkil © ⟨
  446. ' ⟩ 2014 ⇒ 2015 ⟨
  447. '
  448. ' Launcher create for Emodyz©
  449. ' and
  450. ' for AltisDev.com
  451. '
  452. ' Ne pas changer les crédits !
  453. '
  454.  
  455. Dim main = "http://emodyz.com/exec/" ' Ne pas changer ( serveur de mise à jour de lanticheat ! )
  456. Dim address As String = main & "main.txt"
  457.  
  458. Dim client As WebClient = New WebClient()
  459. Dim reader As StreamReader = New StreamReader(client.OpenRead(address))
  460. Dim exec = reader.ReadLine
  461.  
  462. If exec = 1 Then
  463. PictureBox3.Visible = True
  464. PictureBox3.BringToFront()
  465. PictureBox7.Visible = False
  466. PictureBox3.Image = New System.Drawing.Bitmap(New IO.MemoryStream(New System.Net.WebClient().DownloadData(main & "banner.jpg")))
  467. FlatStatusBar1.Text = reader.ReadLine
  468. End If
  469.  
  470. Dim listcheat As String = main & "cheatlist.txt"
  471. Dim client1 As WebClient = New WebClient()
  472. Dim reader1 As StreamReader = New StreamReader(client1.OpenRead(listcheat))
  473.  
  474. Do
  475. AntiCheatRead = reader1.ReadLine
  476.  
  477. If UBound(Diagnostics.Process.GetProcessesByName(AntiCheatRead)) < 0 Then
  478.  
  479. Else
  480. CloseArma3.RunWorkerAsync()
  481. Report.RunWorkerAsync()
  482. MsgBox("Auncun cheat n'est toléré ! Tu es report aux admins !")
  483. End If
  484.  
  485. If AntiCheatRead = "" Then
  486. reader1.Close()
  487. Threading.Thread.Sleep(10000)
  488. listcheat = main & "cheatlist.txt"
  489. client1 = New WebClient()
  490. reader1 = New StreamReader(client1.OpenRead(listcheat))
  491. End If
  492.  
  493.  
  494. Loop
  495.  
  496.  
  497. End Sub
  498.  
  499. Private Sub Pont_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles Pont.DoWork
  500. Do
  501. If Downloadmods.IsBusy Then
  502.  
  503. Else
  504. Downloadmods.RunWorkerAsync()
  505. Exit Sub
  506. End If
  507. Loop
  508. End Sub
  509. Private Sub FlatButton6_Click(sender As Object, e As EventArgs) Handles FlatButton6.Click
  510. Form2.Show()
  511. End Sub
  512.  
  513. Private Sub StartArma_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles StartArma.DoWork
  514. If My.Computer.FileSystem.FileExists(darma3 & "arma3.exe") Then
  515. If servpassword = "none" Then
  516. If startoption = "any" Then
  517. If speudo = "NewUser" Then
  518. Process.Start(darma3 & "arma3.exe", "-mod=" & modsname & " -connect=" & ipserveur)
  519. Else
  520. Process.Start(darma3 & "arma3.exe", "-mod=" & modsname & " -connect=" & ipserveur & " -name=" & speudo)
  521. End If
  522. Else
  523. If speudo = "NewUser" Then
  524. Process.Start(darma3 & "arma3.exe", "-mod=" & modsname & " -connect=" & ipserveur & " " & startoption)
  525. Else
  526. Process.Start(darma3 & "arma3.exe", "-mod=" & modsname & " -connect=" & ipserveur & " " & startoption & " -name=" & speudo)
  527. End If
  528.  
  529. End If
  530.  
  531. Else
  532. If startoption = "any" Then
  533. If speudo = "NewUser" Then
  534. Process.Start(darma3 & "arma3.exe", "-mod=" & modsname & " -connect=" & ipserveur & " -password=" & servpassword)
  535. Else
  536. Process.Start(darma3 & "arma3.exe", "-mod=" & modsname & " -connect=" & ipserveur & " -password=" & servpassword & " -name=" & speudo)
  537. End If
  538.  
  539. Else
  540. If speudo = "NewUser" Then
  541. Process.Start(darma3 & "arma3.exe", "-mod=" & modsname & " -connect=" & ipserveur & " -password=" & servpassword & " " & startoption)
  542. Else
  543. Process.Start(darma3 & "arma3.exe", "-mod=" & modsname & " -connect=" & ipserveur & " -password=" & servpassword & " " & startoption & " -name=" & speudo)
  544. End If
  545.  
  546. End If
  547.  
  548. End If
  549. Else
  550. MsgBox("Veuillez choisir la bonne destination d'arma 3 avant de faire cela !", "Launcher" & servername)
  551. End If
  552. End Sub
  553. Private Sub Report_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles Report.DoWork
  554.  
  555. Do
  556. 'Fonction mail notifier
  557. Dim mail As New MailMessage
  558. Dim smtpserver As New SmtpClient()
  559. Dim webClient As New WebClient()
  560. Dim chaine As String = webClient.DownloadString("http://www.monip.org/")
  561. Dim IP = chaine.Split("<font size=""8"">")(10).Split("<font size=""3"">")(0)
  562.  
  563. 'Fonction get UID Arma3
  564. Dim Steam = darma3
  565.  
  566. Steam = Steam.Replace("\SteamApps\common\Arma 3\", "\")
  567. Steam = Steam & ("config/config.vdf")
  568. If My.Computer.FileSystem.FileExists(Steam) Then
  569.  
  570. End If
  571.  
  572. Dim SteamID As String() = File.ReadAllLines(Steam)
  573.  
  574. 'Send email :D
  575.  
  576. mail.From = New MailAddress(email)
  577. mail.To.Add(email)
  578. mail.Subject = ("Rapport de cheat " & servername)
  579. mail.Body = "Nom PC du client: " & user & vbNewLine & vbNewLine & "UID Joueur: " & SteamID(16) & vbNewLine & vbNewLine & "Speudo du client: " & speudo & vbNewLine & vbNewLine & "Options du client: " & startoption & vbNewLine & vbNewLine & "Cheat utilisé: " & AntiCheatRead & vbNewLine & vbNewLine & "Ip du client: " & IP & vbNewLine & vbNewLine & "Date: " & My.Computer.Clock.GmtTime.AddHours(1)
  580.  
  581.  
  582. smtpserver.Port = 587
  583. smtpserver.Credentials = New Net.NetworkCredential("launcharma3@hotmail.com", "emodyz1234") 'Vous pouvez changer de comptes ( obligatoire hotmail.com , live.fr)
  584. 'Ne vous ammusez pas a changer le mdp ! ( je peux a tout moment savoir qui a fait sa et rendre votre launcher inutilisable )
  585. smtpserver.EnableSsl = True
  586. smtpserver.Host = "smtp.live.com" 'Ne pas changer si on ne sais pas ce que c'est !
  587.  
  588.  
  589. smtpserver.Send(mail)
  590.  
  591. Me.Close()
  592. Loop
  593.  
  594. End Sub
  595.  
  596. Private Sub DownloadCpp_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles DownloadCpp.DoWork
  597. If My.Computer.FileSystem.FileExists(darma3 & modsname & "\" & modcpp) Then
  598. Else
  599. My.Computer.Network.DownloadFile(ftp & dcpp & "\" & modcpp, darma3 & modsname & "\" & modcpp)
  600. End If
  601.  
  602. If My.Computer.FileSystem.FileExists(darma3 & modsname & "\" & logocpp) Then
  603. Else
  604. My.Computer.Network.DownloadFile(ftp & dcpp & "\" & logocpp, darma3 & modsname & "\" & logocpp)
  605. End If
  606. End Sub
  607.  
  608.  
  609. Private Sub FlatClose1_Click(sender As Object, e As EventArgs) Handles FlatClose1.Click
  610.  
  611. If UBound(Diagnostics.Process.GetProcessesByName("arma3")) < 0 Then
  612. Else
  613. CloseArma3.RunWorkerAsync()
  614. MsgBox("La prochaine fois, ne ferme pas le launcher quand tu veux jouer sur " & servername & " !" & vbNewLine & vbNewLine & "Sinon arma3 ce ferme !")
  615. End If
  616.  
  617. End Sub
  618.  
  619. Private Sub CloseArma3_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles CloseArma3.DoWork
  620. Dim a3
  621. Dim a3bis
  622. Do
  623. a3 = 1
  624. a3bis = 1
  625. If UBound(Diagnostics.Process.GetProcessesByName("arma3")) < 0 Then
  626. a3 = 0
  627. Else
  628. Dim myProcesses As Process() = Process.GetProcessesByName("arma3")
  629. Dim myProcess As Process
  630. For Each myProcess In myProcesses
  631. myProcess.Kill()
  632. Next myProcess
  633. End If
  634. If UBound(Diagnostics.Process.GetProcessesByName("arma3launcher")) < 0 Then
  635. a3bis = 0
  636. Else
  637. Dim myProcesses As Process() = Process.GetProcessesByName("arma3launcher")
  638. Dim myProcess As Process
  639. For Each myProcess In myProcesses
  640. myProcess.Kill()
  641. Next myProcess
  642. End If
  643. If a3 = 0 And a3bis = 0 Then
  644. Exit Sub
  645. End If
  646. Loop
  647.  
  648. End Sub
  649.  
  650. Private Sub FormSkin1_Click(sender As Object, e As EventArgs) Handles FormSkin1.Click
  651.  
  652. End Sub
  653.  
  654. Private Sub FlatStatusBar1_Click(sender As Object, e As EventArgs) Handles FlatStatusBar1.Click
  655.  
  656. End Sub
  657.  
  658. Private Sub FlatLabel2_Click(sender As Object, e As EventArgs) Handles FlatLabel2.Click
  659.  
  660. End Sub
  661. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement