Wi-Fi One 2.0.0

De IPS Codes Sources
Sauter à la navigation Sauter à la recherche
Wi-Fi One 2.0.0
Langage de programmation VB.NET, batch, AutoIT
Système compatible Windows 7 et supérieurs
Année de sortie 2019
Statut actuel Stable

Licence

Copyright (C) 2019 IPS - Innovation Programs Studios


These files are parts of Wi-Fi One 2.0.0.

Wi-Fi One 2.0.0 is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Wi-Fi One 2.0.0 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Wi-Fi One 2.0.0. If not, see <https://www.gnu.org/licenses/>.


Website of IPS - Innovation Programs Studios : <https://ipstudios.be>. More informations : <mailto:infos@ipstudios.be>.

Liste des fichiers

form1.vb

 1 Imports System
 2 Imports System.IO
 3 Public Class Form1
 4     Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
 5 
 6         Me.TopMost = True
 7         Me.Button1.PerformClick()
 8         Dim TEMP
 9         TEMP = System.IO.Path.GetTempPath()
10         If My.Computer.FileSystem.FileExists(TEMP & "\wifiver.txt") Then
11             My.Computer.FileSystem.DeleteFile(TEMP & "\wifiver.txt")
12         End If
13     End Sub
14 
15     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
16         Timer1.Enabled = True
17     End Sub
18     Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
19         If ProgressBar1.Value = ProgressBar1.Maximum Then
20             Timer1.Enabled = False
21         Else
22             ProgressBar1.Value = ProgressBar1.Value + 1
23         End If
24         If ProgressBar1.Value = ProgressBar1.Maximum Then
25             Me.Hide()
26             Form2.Show()
27             Form2.WindowState = FormWindowState.Normal
28         End If
29     End Sub
30 
31     Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
32 
33 
34     End Sub
35 End Class

form2.vb

  1 Public Class Form2
  2 
  3     Dim mouse_offset
  4     Private ThisWorkbook As Object
  5 
  6     Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) _
  7 Handles MyBase.MouseDown
  8         mouse_offset = New Point(-e.X, -e.Y)
  9 
 10     End Sub
 11 
 12     Sub Form1_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown
 13         If e.KeyCode = "112" Then
 14             MsgBox("Vous utilisez actuellement Wi-Fi One 2.0.0, un logiciel de IPS - Innovation Programs Studios.", vbOKOnly + vbInformation, "À propos de Wi-Fi One")
 15         End If
 16 
 17     End Sub
 18 
 19     Private Sub Form1_MouseMove(ByVal sender As Object,
 20 ByVal e As System.Windows.Forms.MouseEventArgs) _
 21 Handles MyBase.MouseMove
 22         If e.Button = Windows.Forms.MouseButtons.Left Then
 23             Dim mousePos As Point = Control.MousePosition
 24             mousePos.Offset(mouse_offset.X, mouse_offset.Y)
 25             Location = mousePos
 26         End If
 27     End Sub
 28     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
 29         Me.Hide()
 30         NotifyIcon1.BalloonTipText = "Wi-Fi One 2.0.0 reste en cours d'exécution. Pour l'arrêter définitivement, cliquez-droit sur l'icône puis sur Quitter"
 31         NotifyIcon1.ShowBalloonTip(15000)
 32     End Sub
 33 
 34     Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
 35         WindowState = FormWindowState.Minimized
 36     End Sub
 37 
 38     Private Sub Button3_Click(sender As Object, e As EventArgs)
 39 
 40     End Sub
 41 
 42     Private Sub Label5_Click(sender As Object, e As EventArgs) Handles Label5.Click
 43 
 44     End Sub
 45 
 46     Private Sub Button4_Click(sender As Object, e As EventArgs)
 47 
 48     End Sub
 49 
 50     Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
 51         Me.TopMost = True
 52         Me.TopMost = False
 53 
 54 
 55     End Sub
 56     Private Function CreationDossier(dossierDezip As Object) As Boolean
 57         Throw New NotImplementedException()
 58     End Function
 59 
 60     Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
 61         Form4.Show()
 62 
 63     End Sub
 64 
 65     Private Sub Button3_Click_1(sender As Object, e As EventArgs) Handles Button3.Click
 66         Form8.Show()
 67     End Sub
 68 
 69     Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click
 70 
 71         Me.Hide()
 72         NotifyIcon1.BalloonTipText = "Wi-Fi One 2.0.0 reste en cours d'exécution. Pour l'arrêter définitivement, cliquez-droit sur l'icône puis sur Quitter"
 73         NotifyIcon1.ShowBalloonTip(15000)
 74 
 75 
 76     End Sub
 77 
 78     Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
 79 
 80         Form3.Show()
 81 
 82     End Sub
 83 
 84     Private Sub PictureBox1_Click(sender As Object, e As EventArgs)
 85 
 86     End Sub
 87 
 88     Private Sub Button10_Click(sender As Object, e As EventArgs) Handles Button10.Click
 89         Try
 90             Process.Start("https://faq.ipstudios.be")
 91         Catch ex As Exception
 92             Dim y
 93             y = MsgBox("Désolé, il est impossible de démarrer l'aide pour l'instant. Vous pouvez accéder manuellement à notre Foire Aux Questions (FAQ) en vous rendant à l'adresse https://faq.ipstudios.be.", vbOKOnly + vbExclamation, "Erreur !")
 94         End Try
 95     End Sub
 96 
 97     Private Sub QuitterToolStripMenuItem_Click(sender As Object, e As EventArgs)
 98         Application.Exit()
 99     End Sub
100 
101     Private Sub MasquerToolStripMenuItem_Click(sender As Object, e As EventArgs)
102         Me.Hide()
103     End Sub
104 
105     Private Sub AfficherToolStripMenuItem_Click(sender As Object, e As EventArgs)
106         Me.Show()
107     End Sub
108 
109 
110     Private Sub OuvrirToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles OuvrirToolStripMenuItem.Click
111         Me.Show()
112     End Sub
113 
114     Private Sub QuitterToolStripMenuItem_Click_1(sender As Object, e As EventArgs) Handles QuitterToolStripMenuItem.Click
115         Application.Exit()
116     End Sub
117 
118     Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
119         Form6.Show()
120     End Sub
121 
122     Private Sub ContextMenuStrip1_Opening(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles ContextMenuStrip1.Opening
123 
124     End Sub
125 
126     Private Sub DémarrerToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DémarrerToolStripMenuItem.Click
127         Try
128             Dim procInfo As New ProcessStartInfo()
129             procInfo.UseShellExecute = True
130             procInfo.FileName = ("STARTWIFI.exe")
131             procInfo.WorkingDirectory = ""
132             procInfo.Verb = "runas"
133             Process.Start(procInfo)
134             NotifyIcon1.BalloonTipText = "Le réseau Wi-Fi a démarré !"
135             NotifyIcon1.ShowBalloonTip(15000)
136 
137         Catch ex As Exception
138             MessageBox.Show(ex.Message.ToString())
139         End Try
140     End Sub
141 
142     Private Sub ArrêterToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ArrêterToolStripMenuItem.Click
143         Try
144             Dim procInfo As New ProcessStartInfo()
145             procInfo.UseShellExecute = True
146             procInfo.FileName = ("STOPWIFI.exe")
147             procInfo.WorkingDirectory = ""
148             procInfo.Verb = "runas"
149             Process.Start(procInfo)
150             NotifyIcon1.BalloonTipText = "Le réseau Wi-Fi a été arrêté !"
151             NotifyIcon1.ShowBalloonTip(15000)
152 
153         Catch ex As Exception
154             MessageBox.Show(ex.Message.ToString())
155         End Try
156     End Sub
157 
158     Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
159         Form10.Show()
160     End Sub
161 
162     Private Sub Button4_Click_1(sender As Object, e As EventArgs) Handles Button4.Click
163         Dim EraseWIFI
164         EraseWIFI = MsgBox("Voulez-vous réellement effacer le réseau Wi-Fi ?", vbYesNo + vbQuestion, "Effacer le réseau Wi-Fi ?")
165         If EraseWIFI = vbYes Then
166 
167             Try
168                 Dim procInfo As New ProcessStartInfo()
169                 procInfo.UseShellExecute = True
170                 procInfo.FileName = ("ERASEWIFI.exe")
171                 procInfo.WorkingDirectory = ""
172                 procInfo.Verb = "runas"
173                 Process.Start(procInfo)
174             Catch ex As Exception
175                 MessageBox.Show(ex.Message.ToString())
176             End Try
177 
178             Dim x
179             x = MsgBox("Les paramètres du réseau hébergé sont maintenant supprimés !", vbOKOnly + vbInformation, "Paramètres effacés !")
180         Else
181         End If
182 
183     End Sub
184 
185     Private Sub RapportToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles RapportToolStripMenuItem.Click
186         Process.Start("SIMPLERAPPORT.bat")
187     End Sub
188 
189     Private Sub NotifyIcon1_MouseDoubleClick(sender As Object, e As MouseEventArgs) Handles NotifyIcon1.MouseDoubleClick
190         Me.Show()
191 
192     End Sub
193 
194 
195 
196     Private Sub SignalerUnBugToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles SignalerUnBugToolStripMenuItem.Click
197         Try
198             Process.Start("https://ipstudios.be/bug")
199         Catch ex As Exception
200             Dim y
201             y = MsgBox("Désolé, il est impossible de démarrer le lien de signalement de bugs pour l'instant. Vous pouvez y accéder manuellement en vous rendant à l'adresse https://ipstudios.be/bug.", vbOKOnly + vbExclamation, "Erreur !")
202         End Try
203     End Sub
204 
205     Private Sub Button11_Click(sender As Object, e As EventArgs)
206         Try
207             Process.Start("https://ipstudios.be/bug")
208         Catch ex As Exception
209             Dim y
210             y = MsgBox("Désolé, il est impossible de démarrer le lien de signalement de bugs pour l'instant. Vous pouvez y accéder manuellement en vous rendant à l'adresse https://ipstudios.be/bug.", vbOKOnly + vbExclamation, "Erreur !")
211         End Try
212     End Sub
213 
214     Private Sub Label3_Click(sender As Object, e As EventArgs) Handles Label3.Click
215         MsgBox("Bravo !")
216 
217     End Sub
218 End Class

form3.vb

 1 Imports System.IO
 2 Public Class Form3
 3     Dim mouse_offset
 4     Private Sub Form1_MouseDown(ByVal sender As Object,
 5 ByVal e As System.Windows.Forms.MouseEventArgs) _
 6 Handles MyBase.MouseDown
 7         mouse_offset = New Point(-e.X, -e.Y)
 8     End Sub
 9 
10     Private Sub Form1_MouseMove(ByVal sender As Object,
11 ByVal e As System.Windows.Forms.MouseEventArgs) _
12 Handles MyBase.MouseMove
13         If e.Button = Windows.Forms.MouseButtons.Left Then
14             Dim mousePos As Point = Control.MousePosition
15             mousePos.Offset(mouse_offset.X, mouse_offset.Y)
16             Location = mousePos
17         End If
18     End Sub
19     Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
20         Me.Close()
21         Form2.Show()
22 
23     End Sub
24 
25     Private Sub Form3_Load(sender As Object, e As EventArgs) Handles MyBase.Load
26         Me.TopMost = True
27 
28     End Sub
29 
30     Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
31         MAJ()
32 
33     End Sub
34     Sub MAJ()
35         Try
36             ''Téléchargement du fichier de vérification de mise à jour
37             Dim fileReader As String
38             fileReader = My.Computer.FileSystem.ReadAllText(System.IO.Path.GetTempPath & "\wifiver.txt")
39             If fileReader > 200 Then
40                 Dim x
41                 x = MsgBox("Une nouvelle version de Wi-Fi One est disponible. Désirez-vous la télécharger ?", vbYesNo + vbInformation, "Nouvelle version disponible")
42                 My.Computer.FileSystem.DeleteFile(System.IO.Path.GetTempPath & "\wifiver.txt")
43                 If x = vbYes Then
44                     Dim UtilisateurNAME
45                     UtilisateurNAME = Environment.UserName
46                     Try
47                         Process.Start("https://cmaj.ipstudios.be/wifione/dlv")
48                     Catch ex As Exception
49                         Dim y
50                         y = MsgBox("Désolé, il est impossible de démarrer le lien de téléchargement pour l'instant. Vous pouvez y accéder manuellement en vous rendant à l'adresse https://cmaj.ipstudios.be/wifione/dlv.", vbOKOnly + vbExclamation, "Erreur !")
51                     End Try
52                     Me.Hide()
53                 End If
54             Else
55                 Dim x
56                 x = MsgBox("Aucune nouvelle version disponible !", vbOK + vbInformation, "Aucune nouvelle version disponible")
57             End If
58 
59         Catch ex As Exception
60             NVCDR()
61         End Try
62     End Sub
63     Sub NVCDR()
64         Dim y
65         y = MsgBox("Le serveur a rencontré une erreur et Wi-Fi One n'a pas pu vérifier les mises à jour. Voulez-vous réessayer ? Nous vous conseillons de réessayer deux à trois fois si l'erreur persiste.", vbYesNo + vbInformation, "Erreur serveur")
66         If y = vbYes Then
67             MAJ
68         End If
69     End Sub
70 
71     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
72         Try
73             Process.Start("https://cmaj.ipstudios.be/wifione/")
74         Catch ex As Exception
75             Dim y
76             y = MsgBox("Désolé, il est impossible de démarrer le lien d'abonnement pour l'instant. Vous pouvez y accéder manuellement en vous rendant à l'adresse https://cmaj.ipstudios.be/wifione.", vbOKOnly + vbExclamation, "Erreur !")
77         End Try
78         Me.Hide()
79     End Sub
80 End Class

form4.vb

 1 Public Class Form4
 2     Dim mouse_offset
 3     Private Sub Form1_MouseDown(ByVal sender As Object,
 4 ByVal e As System.Windows.Forms.MouseEventArgs) _
 5 Handles MyBase.MouseDown
 6         mouse_offset = New Point(-e.X, -e.Y)
 7     End Sub
 8 
 9     Private Sub Form1_MouseMove(ByVal sender As Object,
10 ByVal e As System.Windows.Forms.MouseEventArgs) _
11 Handles MyBase.MouseMove
12         If e.Button = Windows.Forms.MouseButtons.Left Then
13             Dim mousePos As Point = Control.MousePosition
14             mousePos.Offset(mouse_offset.X, mouse_offset.Y)
15             Location = mousePos
16         End If
17     End Sub
18     Private Sub Form4_Load(sender As Object, e As EventArgs) Handles MyBase.Load
19         Me.TopMost = True
20 
21     End Sub
22 
23     Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
24         Me.Close()
25         Form2.Show()
26     End Sub
27 
28     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
29         Form5.Show()
30         Me.Hide()
31         MsgBox("Vous devrez redémarrer votre réseau après avoir modifié le mot de passe du réseau Wi-Fi !", +vbExclamation, "Avertissement")
32 
33     End Sub
34 
35     Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
36         Me.Hide()
37         Form7.Show()
38         MsgBox("Vous devrez redémarrer votre réseau après avoir modifié le nom du réseau Wi-Fi !", +vbExclamation, "Avertissement")
39 
40     End Sub
41 End Class

form5.vb

  1 Imports System.IO
  2 Public Class Form5
  3     Dim mouse_offset
  4     Private Sub Form1_MouseDown(ByVal sender As Object,
  5 ByVal e As System.Windows.Forms.MouseEventArgs) _
  6 Handles MyBase.MouseDown
  7         mouse_offset = New Point(-e.X, -e.Y)
  8     End Sub
  9 
 10     Private Sub Form1_MouseMove(ByVal sender As Object,
 11 ByVal e As System.Windows.Forms.MouseEventArgs) _
 12 Handles MyBase.MouseMove
 13         If e.Button = Windows.Forms.MouseButtons.Left Then
 14             Dim mousePos As Point = Control.MousePosition
 15             mousePos.Offset(mouse_offset.X, mouse_offset.Y)
 16             Location = mousePos
 17         End If
 18     End Sub
 19     Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
 20         Dim reponse
 21 
 22         reponse = MsgBox("Êtes-vous sûr de vouloir annuler la modification du mot de passe ?", vbYesNo + vbQuestion, "Quitter ?")
 23         If reponse = vbYes Then
 24             TextBox1.Clear()
 25             TextBox2.Clear()
 26             Form4.Show()
 27             Me.Hide()
 28         Else
 29             TextBox1.Focus()
 30         End If
 31     End Sub
 32 
 33     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
 34         Dim reponse
 35 
 36         reponse = MsgBox("Êtes-vous sûr de vouloir annuler la modification du mot de passe ?", vbYesNo + vbQuestion, "Quitter ?")
 37         If reponse = vbYes Then
 38             TextBox1.Clear()
 39             TextBox2.Clear()
 40             Form4.Show()
 41             Me.Hide()
 42         Else
 43             TextBox1.Focus()
 44         End If
 45 
 46     End Sub
 47 
 48     Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
 49 
 50         If TextBox1.Text = TextBox2.Text Then
 51             VERIFYMDPLENGHT()
 52         Else
 53             TextBox2.Clear()
 54             MsgBox("Les deux mots de passe ne correspondent pas !", +vbExclamation, "Erreur")
 55         End If
 56 
 57     End Sub
 58     Sub VERIFYMDPLENGHT()
 59         Dim NBRTEXTBOXMDP1
 60         NBRTEXTBOXMDP1 = Len(TextBox1.Text)
 61         If NBRTEXTBOXMDP1 < 8 Then
 62             MsgBox("ERREUR : La taille du mot de passe doit être supérieure à 8 caractères !", +vbExclamation, "Erreur")
 63             TextBox1.Clear()
 64             TextBox2.Clear()
 65 
 66         Else
 67             Dim Utilisateur
 68             Utilisateur = Environment.UserName
 69             Using file As StreamWriter = New StreamWriter(System.IO.Path.GetTempPath & "\CHANGEMDP.bat")
 70                 NewMethod(file)
 71             End Using
 72             Process.Start("CHANGEMDP.exe")
 73             Me.Hide()
 74             Form4.Hide()
 75 
 76             Dim CHANGED
 77             CHANGED = MsgBox("Le mot de passe du réseau Wi-Fi a été changé.", 0 + vbInformation, "Le mot de passe du réseau Wi-Fi a été modifié")
 78 
 79             Dim START
 80             START = MsgBox("Voulez-vous redémarrer le réseau Wi-Fi maintenant ?", vbYesNo + vbQuestion, "Redémarrer le réseau Wi-Fi ?")
 81             If START = vbYes Then
 82 
 83 
 84                 Try
 85                     Dim procInfo As New ProcessStartInfo()
 86                     procInfo.UseShellExecute = True
 87                     procInfo.FileName = ("STARTWIFI.exe")
 88                     procInfo.WorkingDirectory = ""
 89                     procInfo.Verb = "runas"
 90                     Process.Start(procInfo)
 91                     Dim Started
 92                     Started = MsgBox("Si vous possédez une carte Wi-Fi, le réseau Wi-Fi a été démarré.", 0 + vbInformation, "Le réseau Wi-Fi a été démarré")
 93 
 94                 Catch ex As Exception
 95                     MessageBox.Show(ex.Message.ToString())
 96                 End Try
 97 
 98             End If
 99 
100 
101         End If
102 
103     End Sub
104 
105     Private Sub NewMethod(file As StreamWriter)
106         NewMethod1(file)
107     End Sub
108 
109     Private Sub NewMethod1(file As StreamWriter)
110         Dim GULLI
111         GULLI = """"
112         Dim MDP
113         MDP = GULLI & TextBox1.Text & GULLI
114         file.WriteLine("netsh wlan set hostednetwork Key=" & MDP)
115         file.WriteLine("del " & System.IO.Path.GetTempPath & "\CHANGEMDP.bat")
116 
117     End Sub
118 
119     Private Sub Button6_Click(sender As Object, e As EventArgs) Handles affiché2.Click
120         Me.affiché2.Visible = False
121         Me.nonaffiché2.Visible = True
122         Me.TextBox2.UseSystemPasswordChar = True
123     End Sub
124 
125     Private Sub Button7_Click(sender As Object, e As EventArgs) Handles affiché2.Click
126         Me.nonaffiché1.Visible = True
127         Me.affiché1.Visible = False
128         Me.TextBox1.UseSystemPasswordChar = True
129     End Sub
130 
131     Private Sub Button4_Click(sender As Object, e As EventArgs) Handles nonaffiché1.Click
132         Me.nonaffiché1.Visible = False
133         Me.affiché1.Visible = True
134         Me.TextBox1.UseSystemPasswordChar = False
135     End Sub
136 
137     Private Sub Button5_Click(sender As Object, e As EventArgs) Handles nonaffiché2.Click
138         Me.nonaffiché2.Visible = False
139         Me.affiché2.Visible = True
140         Me.TextBox2.UseSystemPasswordChar = False
141     End Sub
142 
143     Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
144 
145     End Sub
146 
147     Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles TextBox2.TextChanged
148 
149     End Sub
150     Private Sub SaveFile(ByVal FileName As String, ByVal Content As String)
151         Dim fsTemp As System.IO.FileStream
152         Dim swTemp As System.IO.StreamWriter
153 
154         fsTemp = New System.IO.FileStream(FileName,
155         IO.FileMode.OpenOrCreate, IO.FileAccess.Write)
156         swTemp = New System.IO.StreamWriter(fsTemp)
157 
158         swTemp.WriteLine(Content)
159 
160         swTemp.Flush()
161         swTemp.Close()
162         fsTemp.Close()
163     End Sub
164 
165     Private Sub Form5_Load(sender As Object, e As EventArgs) Handles MyBase.Load
166         Me.TopMost = True
167 
168     End Sub
169 End Class

form6.vb

 1 Public Class Form6
 2     Dim mouse_offset
 3     Private Sub Form1_MouseDown(ByVal sender As Object,
 4 ByVal e As System.Windows.Forms.MouseEventArgs) _
 5 Handles MyBase.MouseDown
 6         mouse_offset = New Point(-e.X, -e.Y)
 7     End Sub
 8 
 9     Private Sub Form1_MouseMove(ByVal sender As Object,
10 ByVal e As System.Windows.Forms.MouseEventArgs) _
11 Handles MyBase.MouseMove
12         If e.Button = Windows.Forms.MouseButtons.Left Then
13             Dim mousePos As Point = Control.MousePosition
14             mousePos.Offset(mouse_offset.X, mouse_offset.Y)
15             Location = mousePos
16         End If
17     End Sub
18     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
19         Shell("SIMPLERAPPORT.bat")
20         Me.Hide()
21 
22     End Sub
23 
24     Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
25         Shell("COMPLETERAPPORT.bat")
26         Me.Hide()
27     End Sub
28 
29     Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
30         Me.Hide()
31     End Sub
32 
33     Private Sub Form6_Load(sender As Object, e As EventArgs) Handles MyBase.Load
34         Me.TopMost = True
35 
36     End Sub
37 End Class

form7.vb

  1 Imports System
  2 Imports System.IO
  3 Public Class Form7
  4     Dim mouse_offset
  5     Private Sub Form1_MouseDown(ByVal sender As Object,
  6 ByVal e As System.Windows.Forms.MouseEventArgs) _
  7 Handles MyBase.MouseDown
  8         mouse_offset = New Point(-e.X, -e.Y)
  9     End Sub
 10 
 11     Private Sub Form1_MouseMove(ByVal sender As Object,
 12 ByVal e As System.Windows.Forms.MouseEventArgs) _
 13 Handles MyBase.MouseMove
 14         If e.Button = Windows.Forms.MouseButtons.Left Then
 15             Dim mousePos As Point = Control.MousePosition
 16             mousePos.Offset(mouse_offset.X, mouse_offset.Y)
 17             Location = mousePos
 18         End If
 19     End Sub
 20     Private Sub Form7_Load(sender As Object, e As EventArgs) Handles MyBase.Load
 21         Me.TopMost = True
 22 
 23     End Sub
 24 
 25     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
 26         Dim reponse
 27 
 28         reponse = MsgBox("Êtes-vous sûr de vouloir annuler la modification du nom ?", vbYesNo + vbQuestion, "Quitter ?")
 29         If reponse = vbYes Then
 30             TextBox1.Clear()
 31             Form4.Show()
 32             Me.Hide()
 33         Else
 34             TextBox1.Focus()
 35         End If
 36 
 37     End Sub
 38 
 39     Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
 40         Dim NBRTEXTBOX1
 41         NBRTEXTBOX1 = Len(TextBox1.Text)
 42         If NBRTEXTBOX1 < 1 Then
 43             MsgBox("ERREUR : Vous devez insérer un nom !", +vbExclamation, "Erreur")
 44             TextBox1.Clear()
 45         Else
 46 
 47             'Dim Utilisateur
 48             'Utilisateur = Environment.UserName
 49             Using file As StreamWriter = New StreamWriter(System.IO.Path.GetTempPath & "\CHANGENOM.bat")
 50                 NewMethod(file)
 51             End Using
 52 
 53 
 54             Process.Start("CHANGENOM.exe")
 55         Me.Hide()
 56         Form4.Hide()
 57 
 58         Dim CHANGED
 59         CHANGED = MsgBox("Le nom du réseau Wi-Fi a été changé.", 0 + vbInformation, "Le nom du réseau Wi-Fi a été modifié")
 60 
 61         Dim START
 62         START = MsgBox("Voulez-vous démarrer le réseau Wi-Fi maintenant ?", vbYesNo + vbQuestion, "Démarrer le réseau Wi-Fi ?")
 63         If START = vbYes Then
 64 
 65 
 66             Try
 67                 Dim procInfo As New ProcessStartInfo()
 68                 procInfo.UseShellExecute = True
 69                 procInfo.FileName = ("STARTWIFI.exe")
 70                 procInfo.WorkingDirectory = ""
 71                 procInfo.Verb = "runas"
 72                 Process.Start(procInfo)
 73                 Dim Started
 74                 Started = MsgBox("Si vous possédez une carte Wi-Fi, le réseau Wi-Fi a été démarré.", 0 + vbInformation, "Le réseau Wi-Fi a été démarré")
 75             Catch ex As Exception
 76                 MessageBox.Show(ex.Message.ToString())
 77             End Try
 78         End If
 79 
 80         End If
 81 
 82 
 83 
 84 
 85     End Sub
 86 
 87     Private Sub NewMethod(file As StreamWriter)
 88         NewMethod1(file)
 89     End Sub
 90 
 91     Private Sub NewMethod1(file As StreamWriter)
 92         Dim TEMP
 93         TEMP = System.IO.Path.GetTempPath()
 94         Dim GULLI
 95         GULLI = """"
 96         Dim NOM
 97         NOM = GULLI & TextBox1.Text & GULLI
 98         file.WriteLine("netsh wlan set hostednetwork SSID=" & NOM)
 99         file.WriteLine("del " & TEMP & "\CHANGENOM.bat")
100 
101     End Sub
102     Private Sub SaveFile(ByVal FileName As String, ByVal Content As String)
103         Dim fsTemp As System.IO.FileStream
104         Dim swTemp As System.IO.StreamWriter
105 
106         fsTemp = New System.IO.FileStream(FileName,
107         IO.FileMode.OpenOrCreate, IO.FileAccess.Write)
108         swTemp = New System.IO.StreamWriter(fsTemp)
109 
110         swTemp.WriteLine(Content)
111 
112         swTemp.Flush()
113         swTemp.Close()
114         fsTemp.Close()
115     End Sub
116 
117     Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
118 
119     End Sub
120 
121     Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
122         Dim reponse
123 
124         reponse = MsgBox("Êtes-vous sûr de vouloir annuler la modification du nom ?", vbYesNo + vbQuestion, "Quitter ?")
125         If reponse = vbYes Then
126             TextBox1.Clear()
127             Form4.Show()
128             Me.Hide()
129         Else
130             TextBox1.Focus()
131         End If
132     End Sub
133 End Class

form8.vb

  1 Imports System.IO
  2 
  3 Public Class Form8
  4 
  5     Dim mouse_offset
  6     Private Sub Form1_MouseDown(ByVal sender As Object,
  7 ByVal e As System.Windows.Forms.MouseEventArgs) _
  8 Handles MyBase.MouseDown
  9         mouse_offset = New Point(-e.X, -e.Y)
 10     End Sub
 11 
 12     Private Sub Form1_MouseMove(ByVal sender As Object,
 13 ByVal e As System.Windows.Forms.MouseEventArgs) _
 14 Handles MyBase.MouseMove
 15         If e.Button = Windows.Forms.MouseButtons.Left Then
 16             Dim mousePos As Point = Control.MousePosition
 17             mousePos.Offset(mouse_offset.X, mouse_offset.Y)
 18             Location = mousePos
 19         End If
 20     End Sub
 21     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
 22         Dim reponse
 23 
 24         reponse = MsgBox("Êtes-vous sûr de vouloir annuler la création du réseau Wi-Fi ?", vbYesNo + vbQuestion, "Quitter ?")
 25         If reponse = vbYes Then
 26             TextBox1.Clear()
 27             Me.Hide()
 28         Else
 29             TextBox1.Focus()
 30         End If
 31 
 32     End Sub
 33 
 34     Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
 35         If Me.TextBox1.Text = "Jeu" Then
 36             EOF()
 37         End If
 38         Dim NBRTEXTBOX1
 39         NBRTEXTBOX1 = Len(TextBox1.Text)
 40         If NBRTEXTBOX1 < 1 Then
 41             MsgBox("ERREUR : Vous devez insérer un nom !", +vbExclamation, "Erreur")
 42             TextBox1.Clear()
 43         Else
 44             Dim Utilisateur
 45             Utilisateur = Environment.UserName
 46             Using file As StreamWriter = New StreamWriter(System.IO.Path.GetTempPath & "\CREATE1.bat")
 47                 NewMethod(file)
 48             End Using
 49 
 50             Me.Hide()
 51             Form9.Show()
 52         End If
 53 
 54 
 55     End Sub
 56 
 57     Private Sub NewMethod(file As StreamWriter)
 58         NewMethod1(file)
 59     End Sub
 60 
 61     Private Sub NewMethod1(file As StreamWriter)
 62         Dim GULLI
 63         GULLI = """"
 64         Dim TEMP
 65         TEMP = System.IO.Path.GetTempPath()
 66         Dim NOM
 67         NOM = GULLI & TextBox1.Text & GULLI
 68         file.WriteLine("netsh wlan set hostednetwork SSID=" & NOM)
 69         file.WriteLine("del " & TEMP & "\CREATE1.bat")
 70 
 71     End Sub
 72     Private Sub SaveFile(ByVal FileName As String, ByVal Content As String)
 73         Dim fsTemp As System.IO.FileStream
 74         Dim swTemp As System.IO.StreamWriter
 75 
 76         fsTemp = New System.IO.FileStream(FileName,
 77         IO.FileMode.OpenOrCreate, IO.FileAccess.Write)
 78         swTemp = New System.IO.StreamWriter(fsTemp)
 79 
 80         swTemp.WriteLine(Content)
 81 
 82         swTemp.Flush()
 83         swTemp.Close()
 84         fsTemp.Close()
 85     End Sub
 86 
 87     Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
 88 
 89     End Sub
 90 
 91     Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
 92         Me.Hide()
 93     End Sub
 94 
 95     Private Sub Form8_Load(sender As Object, e As EventArgs) Handles MyBase.Load
 96         Me.TopMost = True
 97 
 98     End Sub
 99     Private Sub EOF()
100         Me.Hide()
101 
102         Dim Jeu
103         Jeu = MsgBox("Détruisez tous les vaisseaux qui vous empêchent d'accéder à Internet grâce à Wi-Fi One ! Attention ! Les câbles Ethernet qui vous tournent autour ne sont pas innofensifs... Vous perdez des points de vie chaque fois que vous êtes endommagé.e par les objets qui vous entourent ou par les vaisseaux ennememis... Votre seul but est d'arriver à la fin. Bonne chance !", 0 + 64 + 4096, "Wi-Fi One - EasterEgg !")
104         If Jeu = vbOK Then
105             Try
106                 Process.Start(Application.StartupPath & "\EE\Wi-Fi One 2.0.0  Easter Egg.exe")
107             Catch ex As Exception
108                 Dim x
109                 x = MsgBox("Oooooh ! Le jeu est malheureusement indisponible... Désolé !", 0 + 16 + 4096, "Erreur !")
110             End Try
111 
112         End If
113     End Sub
114 End Class

form9.vb

  1 Imports System.IO
  2 
  3 Public Class Form9
  4     Dim mouse_offset
  5     Private Sub Form1_MouseDown(ByVal sender As Object,
  6 ByVal e As System.Windows.Forms.MouseEventArgs) _
  7 Handles MyBase.MouseDown
  8         mouse_offset = New Point(-e.X, -e.Y)
  9     End Sub
 10 
 11     Private Sub Form1_MouseMove(ByVal sender As Object,
 12 ByVal e As System.Windows.Forms.MouseEventArgs) _
 13 Handles MyBase.MouseMove
 14         If e.Button = Windows.Forms.MouseButtons.Left Then
 15             Dim mousePos As Point = Control.MousePosition
 16             mousePos.Offset(mouse_offset.X, mouse_offset.Y)
 17             Location = mousePos
 18         End If
 19     End Sub
 20     Private Sub Form9_Load(sender As Object, e As EventArgs) Handles MyBase.Load
 21         If Form8.TextBox1.Text = "Jeu" Then
 22             Me.Hide()
 23         Else
 24             Me.TopMost = True
 25         End If
 26 
 27 
 28     End Sub
 29 
 30     Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
 31         Dim reponse
 32         reponse = MsgBox("Êtes-vous sûr de vouloir annuler la création du réseau Wi-Fi ?", vbYesNo + vbQuestion, "Quitter ?")
 33         If reponse = vbYes Then
 34             TextBox1.Clear()
 35             TextBox2.Clear()
 36             Me.Hide()
 37         Else
 38             TextBox1.Focus()
 39         End If
 40 
 41     End Sub
 42 
 43     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
 44         Dim reponse
 45 
 46         reponse = MsgBox("Êtes-vous sûr de vouloir annuler la création du réseau Wi-Fi ?", vbYesNo + vbQuestion, "Quitter ?")
 47         If reponse = vbYes Then
 48             TextBox1.Clear()
 49             TextBox2.Clear()
 50             Me.Hide()
 51         Else
 52             TextBox1.Focus()
 53         End If
 54 
 55     End Sub
 56 
 57     Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
 58 
 59         If TextBox1.Text = TextBox2.Text Then
 60             VERIFYMDPLENGHT()
 61         Else
 62             TextBox2.Clear()
 63             MsgBox("Les deux mots de passe ne correspondent pas !", +vbExclamation, "Erreur")
 64         End If
 65 
 66     End Sub
 67     Sub VERIFYMDPLENGHT()
 68         Dim NBRTEXTBOXMDP1
 69         NBRTEXTBOXMDP1 = Len(TextBox1.Text)
 70         If NBRTEXTBOXMDP1 < 8 Then
 71             MsgBox("ERREUR : La taille du mot de passe doit être supérieure à 8 caractères !", +vbExclamation, "Erreur")
 72             TextBox1.Clear()
 73             TextBox2.Clear()
 74 
 75         Else
 76             Dim Utilisateur
 77             Utilisateur = Environment.UserName
 78             Using file As StreamWriter = New StreamWriter(System.IO.Path.GetTempPath & "\CREATE2.bat")
 79                 NewMethod(file)
 80             End Using
 81 
 82 
 83             Try
 84                 Dim procInfo As New ProcessStartInfo()
 85                 procInfo.UseShellExecute = True
 86                 procInfo.FileName = ("CREATE.exe")
 87                 procInfo.WorkingDirectory = ""
 88                 procInfo.Verb = "runas"
 89                 Process.Start(procInfo)
 90                 Dim Created
 91                 Created = MsgBox("Si vous possédez une carte Wi-Fi, le réseau Wi-Fi a été créé.", 0 + vbInformation, "Le réseau Wi-Fi a été créé")
 92 
 93             Catch ex As Exception
 94                 MessageBox.Show(ex.Message.ToString())
 95             End Try
 96             TextBox1.Clear()
 97             TextBox2.Clear()
 98             Form8.TextBox1.Clear()
 99             Me.Hide()
100 
101 
102             Dim START
103 
104             START = MsgBox("Voulez-vous démarrer le réseau Wi-Fi maintenant ?", vbYesNo + vbQuestion, "Démarrer le réseau Wi-Fi ?")
105             If START = vbYes Then
106 
107 
108                 Try
109                     Dim procInfo As New ProcessStartInfo()
110                     procInfo.UseShellExecute = True
111                     procInfo.FileName = ("STARTWIFI.exe")
112                     procInfo.WorkingDirectory = ""
113                     procInfo.Verb = "runas"
114                     Process.Start(procInfo)
115                     Dim Started
116                     Started = MsgBox("Si vous possédez une carte Wi-Fi, le réseau Wi-Fi a été démarré.", 0 + vbInformation, "Le réseau Wi-Fi a été démarré")
117 
118                 Catch ex As Exception
119                     MessageBox.Show(ex.Message.ToString())
120                 End Try
121                 Me.Hide()
122             Else
123                 Me.Hide()
124             End If
125 
126         End If
127 
128     End Sub
129 
130     Private Sub NewMethod(file As StreamWriter)
131         NewMethod1(file)
132     End Sub
133 
134     Private Sub NewMethod1(file As StreamWriter)
135         Dim GULLI
136         GULLI = """"
137         Dim TEMP
138         TEMP = System.IO.Path.GetTempPath()
139         Dim MDP
140         MDP = GULLI & TextBox1.Text & GULLI
141         file.WriteLine("netsh wlan set hostednetwork Key=" & MDP)
142         file.WriteLine("del " & TEMP & "\CREATE2.bat")
143 
144     End Sub
145 
146     Private Sub Button6_Click(sender As Object, e As EventArgs) Handles affiché2.Click
147         Me.affiché2.Visible = False
148         Me.nonaffiché2.Visible = True
149         Me.TextBox2.UseSystemPasswordChar = True
150     End Sub
151 
152     Private Sub Button7_Click(sender As Object, e As EventArgs) Handles affiché2.Click
153         Me.nonaffiché1.Visible = True
154         Me.affiché1.Visible = False
155         Me.TextBox1.UseSystemPasswordChar = True
156     End Sub
157 
158     Private Sub Button4_Click(sender As Object, e As EventArgs) Handles nonaffiché1.Click
159         Me.nonaffiché1.Visible = False
160         Me.affiché1.Visible = True
161         Me.TextBox1.UseSystemPasswordChar = False
162     End Sub
163 
164     Private Sub Button5_Click(sender As Object, e As EventArgs) Handles nonaffiché2.Click
165         Me.nonaffiché2.Visible = False
166         Me.affiché2.Visible = True
167         Me.TextBox2.UseSystemPasswordChar = False
168     End Sub
169 
170     Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
171 
172     End Sub
173 
174     Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles TextBox2.TextChanged
175 
176     End Sub
177     Private Sub SaveFile(ByVal FileName As String, ByVal Content As String)
178         Dim fsTemp As System.IO.FileStream
179         Dim swTemp As System.IO.StreamWriter
180 
181         fsTemp = New System.IO.FileStream(FileName,
182         IO.FileMode.OpenOrCreate, IO.FileAccess.Write)
183         swTemp = New System.IO.StreamWriter(fsTemp)
184 
185         swTemp.WriteLine(Content)
186 
187         swTemp.Flush()
188         swTemp.Close()
189         fsTemp.Close()
190     End Sub
191 
192     Private Sub Form5_Load(sender As Object, e As EventArgs) Handles MyBase.Load
193 
194     End Sub
195 
196     Private Sub Label4_Click(sender As Object, e As EventArgs) Handles Label4.Click
197 
198     End Sub
199 End Class

form10.vb

 1 Public Class Form10
 2     Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
 3         Me.Hide()
 4     End Sub
 5     Dim mouse_offset
 6     Private Sub Form1_MouseDown(ByVal sender As Object,
 7 ByVal e As System.Windows.Forms.MouseEventArgs) _
 8 Handles MyBase.MouseDown
 9         mouse_offset = New Point(-e.X, -e.Y)
10     End Sub
11 
12     Private Sub Form1_MouseMove(ByVal sender As Object,
13 ByVal e As System.Windows.Forms.MouseEventArgs) _
14 Handles MyBase.MouseMove
15         If e.Button = Windows.Forms.MouseButtons.Left Then
16             Dim mousePos As Point = Control.MousePosition
17             mousePos.Offset(mouse_offset.X, mouse_offset.Y)
18             Location = mousePos
19         End If
20     End Sub
21     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
22         Try
23             Dim procInfo As New ProcessStartInfo()
24             procInfo.UseShellExecute = True
25             procInfo.FileName = ("STARTWIFI.exe")
26             procInfo.WorkingDirectory = ""
27             procInfo.Verb = "runas"
28             Process.Start(procInfo)
29             Dim Started
30             Started = MsgBox("Si vous possédez une carte Wi-Fi, le réseau Wi-Fi a été démarré.", 0 + vbInformation, "Le réseau Wi-Fi a été démarré")
31 
32         Catch ex As Exception
33             MessageBox.Show("Démarrage annulé !")
34         End Try
35         Me.Hide()
36     End Sub
37 
38     Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
39         Try
40             Dim procInfo As New ProcessStartInfo()
41             procInfo.UseShellExecute = True
42             procInfo.FileName = ("STOPWIFI.exe")
43             procInfo.WorkingDirectory = ""
44             procInfo.Verb = "runas"
45             Process.Start(procInfo)
46             Dim Stopped
47             Stopped = MsgBox("Si vous possédez une carte Wi-Fi, le réseau Wi-Fi a été arrêté.", 0 + vbInformation, "Le réseau Wi-Fi a été arrêté")
48 
49         Catch ex As Exception
50             MessageBox.Show("Arrêt annulé !")
51         End Try
52         Me.Hide()
53 
54     End Sub
55 
56     Private Sub Form10_Load(sender As Object, e As EventArgs) Handles MyBase.Load
57         Me.TopMost = True
58 
59     End Sub
60 End Class

COMPLETERAPPORT.bat

 1 @echo off
 2 title Rapport complet - Wi-Fi One
 3 color 3F
 4 netsh wlan show hostednetwork
 5 echo.
 6 echo.
 7 netsh wlan show interfaces
 8 pause
 9 echo.
10 echo.
11 netsh wlan show allowexplicitcreds
12 echo.
13 echo.
14 netsh wlan show settings
15 pause
16 echo.
17 echo.
18 netsh wlan show drivers
19 echo.
20 echo.
21 echo APPUYEZ SUR UNE TOUCHE POUR FERMER
22 pause>nul
23 exit

ERASEWIFI.bat

1 netsh wlan stop hostednetwork
2 netsh wlan set hostednetwork ssid="<SSID>" key="<KEYREINITIALISED>"

SIMPLERAPPORT.bat

 1 @echo off
 2 title Rapport simple - Wi-Fi One
 3 color 3F
 4 mode con: lines=100 cols=80
 5 :refreshed
 6 netsh wlan show hostednetwork
 7 :refresh
 8 timeout /t 3 /nobreak
 9 cls
10 goto :refreshed

STARTWIFI.bat

1 netsh wlan start hostednetwork

STOPWIFI.bat

1 netsh wlan stop hostednetwork

CHANGEMDP.au3 => CHANGEMDP.exe

1 Run(@TempDir & "\CHANGEMDP.bat", "", @SW_HIDE)

CHANGENOM.au3 => CHANGENOM.exe

1 Run(@TempDir & "\CHANGENOM.bat", "", @SW_HIDE)

CREATE.au3 => CREATE.exe

1 Run( @TempDir & "\CREATE1.bat", "", @SW_HIDE)
2 Run( @TempDir & "\CREATE2.bat", "", @SW_HIDE)

ERASEWIFI.au3 => ERASEWIFI.exe

1 Run("ERASEWIFI.bat", "", @SW_HIDE)

STARTWIFI.au3 => STARTWIFI.exe

1 Run("STARTWIFI.bat", "", @SW_HIDE)

STOPWIFI.au3 => STOPWIFI.exe

1 Run("STOPWIFI.bat", "", @SW_HIDE)