-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOpen Ports.bat
311 lines (293 loc) · 11.7 KB
/
Open Ports.bat
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
299
300
301
302
303
304
305
306
307
308
309
310
311
@echo off
:: Variables De Configuraciones
rem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
chcp 65001
set "ver=v1"
set "by=craciu25_YT"
set "masapps=https://sites.google.com/view/teamdevelopers"
set "github=https://github.com/AuchenDevs"
set "githubc=https://github.com/craciu25yt"
set "ultac=1/1/22"
set "stable=No info"
rem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
cls
:: Inicio Sin Administrador...
REM ~~~~~~~~~~~~~~~~~~~~~~~~>
net session >NUL 2>&1
IF %ERRORLEVEL% EQU 0 ( SET USERSTATUS=Administrator) else (
color 4
echo WARINING! WARINING! WARINING! WARINING! WARINING! WARINING! WARINING! WARINING!
echo.
echo Tienes que ejecutar este programa como administrador!
echo.
echo WARINING! WARINING! WARINING! WARINING! WARINING! WARINING! WARINING! WARINING!
timeout 4 >null
exit
)
cls
REM ~~~~~~~~~~~~~~~~~~~~~~~~
:menu
cls
color b
title Open Ports - By craciu25_YT
cls
echo _____________________________________________________________________________
echo )
echo [Open Ports - By craciu25_YT ] )
echo )
echo [ Elija Una Opcion ] )
echo )
echo )
echo [1]. Abrir puertos .. )
echo )
echo [2]. Cerrar puertos .. )
echo )
echo [3]. APPInfo .. )
echo )
echo [4]. Cerrar La Script .. )
echo )
echo _____________________________________________________________________________)
set/p craciu=Elija Una Opcion:
if %craciu%== 1 goto openports
if %craciu%== 2 goto closeports
if %craciu%== 3 goto appinfo
if %craciu%== 4 exit
:openports
cls
echo _____________________________________________________________________________
echo )
echo [Open Ports - By craciu25_YT ] )
echo )
echo [ Elija Una Opcion ] )
echo )
echo )
echo [1]. Puerto TCP .. )
echo )
echo [2]. Puerto UDP .. )
echo )
echo [3]. Volver al menu .. )
echo _____________________________________________________________________________)
set/p craciu=Elija Una Opcion:
if %craciu%== 1 goto menuopentcp
if %craciu%== 2 goto menuopenudp
if %craciu%== 3 exit
:menuopentcp
cls
echo _____________________________________________________________________________
echo )
echo [Open Ports - By craciu25_YT ] )
echo )
echo [ Que puerto quiere abrir (TCP)] )
echo )
echo )
echo [1]. 80 (http) .. )
echo )
echo [2]. 19132 (Minecraft Bedrock Server) .. )
echo )
echo [3]. 25565 (Minecraft Java Server) .. )
echo )
echo [4]. Puerto personalizado .. )
echo _____________________________________________________________________________)
set/p craciu=Elija Una Opcion:
if %craciu%== 1 goto opentcp80
if %craciu%== 2 goto opentcp19132
if %craciu%== 3 goto opentcp25565
if %craciu%== 4 goto opentcpcustom
:opentcp80
cls
echo Abriendo puerto 80...
timeout /NOBREAK /T 2 >null
netsh advfirewall firewall add rule name="OpenPorts Open TCP 80" dir=in action=allow protocol=TCP localport=80
cls
echo Puerto 80 abierto con exito!
timeout /NOBREAK /T 2 >null
goto menu
:opentcp19132
cls
echo Abriendo puerto 19132...
timeout /NOBREAK /T 2 >null
netsh advfirewall firewall add rule name="OpenPorts Open TCP 19132" dir=in action=allow protocol=TCP localport=19132
cls
echo Puerto 19132 abierto con exito!
timeout /NOBREAK /T 2 >null
goto menu
:opentcp25565
cls
echo Abriendo puerto 25565...
timeout /NOBREAK /T 2 >null
netsh advfirewall firewall add rule name="OpenPorts Open TCP 25565" dir=in action=allow protocol=TCP localport=25565
cls
echo Puerto 25565 abierto con exito!
timeout /NOBREAK /T 2 >null
goto menu
:opentcpcustom
cls
echo Que puerto quiere abrir (TCP)?
set/p port=
cls
echo Usted quiere abrir el puerto "%port%"?
set/p son=Si o No:
if %son%==si goto opentcpcustomyes
if %son%==sI goto opentcpcustomyes
if %son%==SI goto opentcpcustomyes
if %son%==Si goto opentcpcustomyes
if %son%==s goto opentcpcustomyes
if %son%==S goto opentcpcustomyes
REM ~~~~~~~~~~~~~~~~~~~~~~~~
if %son%==no goto opentcpcustom
if %son%==nO goto opentcpcustom
if %son%==NO goto opentcpcustom
if %son%==No goto opentcpcustom
if %son%==n goto opentcpcustom
if %son%==N goto opentcpcustom
:opentcpcustomyes
cls
echo Abriendo puerto %port%
timeout /NOBREAK /T 2 >null
netsh advfirewall firewall add rule name="OpenPorts Open TCP %port%" dir=in action=allow protocol=TCP localport=%port%
goto menu
:menuopenudp
cls
echo _____________________________________________________________________________
echo )
echo [Open Ports - By craciu25_YT ] )
echo )
echo [ Que puerto quiere abrir (UDP) ] )
echo )
echo )
echo [1]. Puerto personalizado .. )
echo _____________________________________________________________________________)
set/p craciu=Elija Una Opcion:
if %craciu%== 1 goto openudpcustom
:openudpcustom
cls
echo Que puerto quiere abrir (UDP)?
set/p port=
cls
echo Usted quiere abrir el puerto "%port%"?
set/p son=Si o No:
if %son%==si goto openudpcustomyes
if %son%==sI goto openudpcustomyes
if %son%==SI goto openudpcustomyes
if %son%==Si goto openudpcustomyes
if %son%==s goto openudpcustomyes
if %son%==S goto openudpcustomyes
REM ~~~~~~~~~~~~~~~~~~~~~~~~
if %son%==no goto openudpcustom
if %son%==nO goto openudpcustom
if %son%==NO goto openudpcustom
if %son%==No goto openudpcustom
if %son%==n goto openudpcustom
if %son%==N goto openudpcustom
:openudpcustomyes
cls
echo Abriendo puerto %port%
timeout /NOBREAK /T 2 >null
netsh advfirewall firewall add rule name="OpenPorts Open UDP %port%" dir=in action=allow protocol=UDP localport=%port%
goto menu
:closeports
cls
echo _____________________________________________________________________________
echo )
echo [Open Ports - By craciu25_YT ] )
echo )
echo [ Elija Una Opcion ] )
echo )
echo )
echo [1]. Puerto TCP .. )
echo )
echo [2]. Puerto UDP .. )
echo )
echo [3]. Volver al menu .. )
echo _____________________________________________________________________________)
set/p craciu=Elija Una Opcion:
if %craciu%== 1 goto menuclosetcp
if %craciu%== 2 goto menucloseudp
if %craciu%== 3 exit
:menuclosetcp
cls
echo Que puerto quiere cerrar (TCP)?
set/p port=
cls
echo Usted quiere cerrar el puerto "%port%"?
set/p son=Si o No:
if %son%==si goto closetcp
if %son%==sI goto closetcp
if %son%==SI goto closetcp
if %son%==Si goto closetcp
if %son%==s goto closetcp
if %son%==S goto closetcp
REM ~~~~~~~~~~~~~~~~~~~~~~~~
if %son%==no goto menuclosetcp
if %son%==nO goto menuclosetcp
if %son%==NO goto menuclosetcp
if %son%==No goto menuclosetcp
if %son%==n goto menuclosetcp
if %son%==N goto menuclosetcp
:closetcp
cls
echo Cerrando puerto %port%
timeout /NOBREAK /T 2 >null
netsh advfirewall firewall delete rule name="OpenPorts Open TCP %port%"
netsh advfirewall firewall add rule name="OpenPorts Close TCP %port%" dir=in action=block protocol=TCP localport=%port%
cls
echo Puerto %port% TCP cerrado.
timeout /NOBREAK /T 2 >null
goto menu
:menucloseudp
cls
echo Que puerto quiere cerrar (UDP)?
set/p port=
cls
echo Usted quiere cerrar el puerto "%port%"?
set/p son=Si o No:
if %son%==si goto closeudp
if %son%==sI goto closeudp
if %son%==SI goto closeudp
if %son%==Si goto closeudp
if %son%==s goto closeudp
if %son%==S goto closeudp
REM ~~~~~~~~~~~~~~~~~~~~~~~~
if %son%==no goto menucloseudp
if %son%==nO goto menucloseudp
if %son%==NO goto menucloseudp
if %son%==No goto menucloseudp
if %son%==n goto menucloseudp
if %son%==N goto menucloseudp
:closeudp
cls
echo Cerrando puerto %port%
timeout /NOBREAK /T 2 >null
netsh advfirewall firewall delete rule name="OpenPorts Open UDP %port%"
netsh advfirewall firewall add rule name="OpenPorts Close UDP %port%" dir=in action=block protocol=UDP localport=%port%
cls
echo Puerto %port% UDP cerrado.
timeout /NOBREAK /T 2 >null
goto menu
:appinfo
cls
echo __________________________________
echo.
echo APPInfo
echo.
echo.
echo Version: %ver%
echo.
echo By %by%
echo.
echo Mas apps en:
echo %masapps%
echo.
echo Github AuchenDevs: %github%
echo.
echo Github craciu: %githubc%
echo.
echo Dia que se finalizo la %ver%:
echo %ultac%
echo.
echo Ver. estable: %stable%
echo __________________________________
echo.
echo.
echo Pulsa enter para volver al menu
pause >null