-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathCommands Windows OS.py
304 lines (178 loc) · 6.35 KB
/
Commands Windows OS.py
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
#################################################################################
# The software is licensed Creative Commons CC-BY-NC-SA. Under this agreement #
# you are authorized to use, share on the same rights or edit this software #
# for personnal purpose only. You are not allow to sell this software. #
# #
# Official Website : https://coinpaign.com #
# Contact : romain.guihot@gmail.com #
# This file is not use by the remote administration yet, you can use it for #
# a command memento for Windows #
#################################################################################
# A SAVOIR :
# os.system() function permet l'execution de commande system
# subprocess.call() Function permet l'execution de commande system
# subprocess.call >= os.system ( + Rapide pour execute shell / bash commandes )
### IMPORTATIONS NECESSAIRES ###
import platform
## VOIR TYPE D'OS ##
osType = platform.system()
print("OS TYPE: " + osType)
## VOIR TOUT LES PORTS ACTIFS ##
import os
print("Tout les ports actifs: ")
os.system("netstat -a")
## VOIR LES CONNEXIONS ENTRANTES/SORTANTES + PORTS ACTIFS##
import os
print("Liste des connexions entrantes/sortantes & ports actifs :")
os.system("netstat -n")
## VOIR FICHIERS EXECUTABLES A L'ORIGINE DES CONNEXIONS OU DES PORTS D'ECOUTE ##
import os
print("netstat -b")
os.system("netstat -b")
# Note : netstat -b -v 5 = Reactualiser toute les 5 secondes
## VOIR LES STATISTIQUES PAR PROTOCOLE ##
import os
print("Voir les statistiques par protocole:")
os.system("netstat -s")
## VOIR LA TABLE DE ROUTAGE ##
import os
print("Voir la table de routage:")
os.system("netstat -r")
## VOIR LE CHEMIN SUIVIT PAR UN PAQUET IP ##
import os
print("voir le chemin suivit par un paquet IP")
os.system("tracert 185.85.12.47")
# Note : IP A MODIFIER SELON LE SERVEUR SUIVI
## VOIR INFORMATIONS RESEAUX SIMPLIFIEES ##
import os
print("Information reseau simplifie")
os.system("ipconfig")
## VOIR INFORMATION IP PUBLIC DE LA MACHINE ##
import os
print("Voir Addresse IP WAN / Public :")
os.system("nslookup myip.opendns.com. resolver1.opendns.com")
## VOIR TOUTE LES INFORMATIONS RESEAUX DE LA MACHINE ##
import os
print("Informations reseaux detailles")
os.system("ipconfig /all")
## VOIR TOUTE LES @MAC DE TOUTE LES CARTES RESEAUX DE LA MACHINE ##
import os
print("Addresse mac des cartes reseaux")
os.system("getmac /v")
## EXECUTER UNE REQUETE PING ##
import os
print("Executer une requete ping")
os.system("ping 192.168.1.254")
# Note : DEFINIR L IP SELON LA REQUETE + FAIRE /t POUR REQUETE EN CONTINUE
## VOIR LES INFORMATIONS DE LA MACHINE ##
import os
print("Toute les informations de la machine")
os.system("systeminfo")
## ETEINDRE LA MACHINE ##
import os
print("Eteindre la machine")
os.system("shutdown")
## REDEMARRER LA MACHINE ##
import os
print("Redemarrer la machine")
os.system("shutdown -r")
## MONTRER LE REPERTOIRE BUREAU ##
import os
print("Acceder au bureau")
os.system("dir desktop")
## MONTRER LE REPERTOIRE DOCUMENT ##
import os
print("Acceder aux documents")
os.system("dir documents")
## MONTRER LE REPERTOIRE IMAGES ##
import os
print("Acceder aux images")
os.system("dir pictures")
## MONTRER LE REPERTOIRE TELECHARGEMENT ##
import os
print("Acceder aux telechargements")
os.system("dir downloads")
## MONTRER LES FICHIERS RECENTS ##
import os
print("Acceder au bureau")
os.system("dir recent")
## AFFICHIER TOUT LES PROCESSUS/SERVICES DE LA MACHINE ##
import os
print("Tout les processus en cours")
os.system("tasklist")
## AFFICHER LES SERVICES EN GUI ##
import os
print("Afficher les services actifs")
os.system("services.msc")
## AFFICHER LE GESTIONNAIRE DES DISQUES - ! GRAPHIQUE UNIQUEMENT ! ##
import os
print("Afficher le gestionnaire des disques de la machine")
os.system("diskmgmt.dsc")
## AFFICHER LE GESTIONNAIRE DE PARTION DES DISQUES - ! GRAPHIQUE UNIQUEMENT ! ##
import os
print("Afficher le gestionnaire de partition des disques")
os.system("diskpart")
## AFFICHER LE DEGRAMENTEUR DES DISQUES - ! GRAPHIQUE UNIQUEMENT ! ##
import os
print("Afficher le deframenteur de disque")
os.system("dfrg.msc")
## AFFICHER LES PERIPHERIQUES RESEAUX DE LA MACHINE - ! GRAPHIQUE UNIQUEMENT ! ##
import os
print("Afficher les peripheriques reseaux")
os.system("ncpa.cpl")
## AFFICHER LA CONNEXION BUREAU A DISTANCE - ! GRAPHIQUE UNIQUEMENT ! ##
import os
print("Afficher connexion bureau a distance")
os.system("mstsc.exe")
## SUPPRIMER DES PROGRAMMES - ! GRAPHIQUE UNIQUEMENT ! ##
import os
print("Affichier la suppresion des programmes")
os.system("appwiz.cpl")
## GESTION DE L'ORDINATEUR - ! GRAPHIQUE UNIQUEMENT ! ##
import os
print("Afficher le gestionnaire de l'ordinateur")
os.system("compmgmt.msc")
## GESTIONNAIRE DES PERIPHERIQUES - ! GRAPHIQUE UNIQUEMENT ! ##
import os
print("Gestionnaire des peripheriques")
os.system("devmgmt.msc")
## OBSERVATEUR DES EVENEMENTS DE LA MACHINE - ! GRAPHIQUE UNIQUEMENT ! ##
import os
print("Observateur des evenements")
os.system("eventvwr.msc")
## AFFICHER LE GESTIONNAIRE DES TACHES - ! GRAPHIQUE UNIQUEMENT ! ##
import os
print("Afficher le gestionnaire des taches - CTRL + ALT + SUPPR")
os.system("taskmgr")
## CONFIGURATIONS DES SESSIONS UTILISATEURS - ! GRAPHIQUE UNIQUEMENT ! ##
import os
print("Configurations des sessions de la machine")
os.system("netplwiz")
## AFFICHER LE REGISTRE DE LA MACHINE - ! GRAPHIQUE UNIQUEMENT ! ##
import os
print("Afficher le registre de la machine")
os.system("regedit")
## AFFICHER LES OPTIONS DE DEMARRAGES - ! GRAPHIQUE UNIQUEMENT ! ##
import os
print("Afficher les options de demarrages")
os.system("msconfig")
## AFFICHER L'INVITE DE COMMANDE - ! GRAPHIQUE UNIQUEMENT ! ##
import os
print("Afficher l'invite de commande")
os.system("cmd")
## AFFICHER LE BLOC NOTE - ! GRAPHIQUE UNIQUEMENT ! ##
import os
print("Afficher le bloc note")
os.system("notepad")
## AFFICHE L'HEURE DE LA MACHINE ##
import os
print("Afficher l'heure du system")
os.system("time")
## FORCER LES GPO - ACTIVE DIRECTORY ##
import os
print("Forcer les GPO d'Active Directory")
os.system("gpupdate /force")
## CLAVIER VIRTUEL ##
import os
print("Afficher le clavier virtuel")
os.system("osk")