Skip to content

Commit 0af0a93

Browse files
committed
Blaze Scripts
1 parent 406a338 commit 0af0a93

File tree

12 files changed

+190
-1
lines changed

12 files changed

+190
-1
lines changed

CheckNetwork/CheckInternet.bat

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
@echo off
22

3+
echo """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
4+
echo " ____ _ _____ _ _ "
5+
echo " | _ \| | / ____| (_) | | "
6+
echo " | |_) | | __ _ _______ | (___ ___ _ __ _ _ __ | |_ ___ "
7+
echo " | _ <| |/ _` |_ / _ \ \___ \ / __| '__| | '_ \| __/ __| "
8+
echo " | |_) | | (_| |/ / __/ ____) | (__| | | | |_) | |_\__ \ "
9+
echo " |____/|_|\__,_/___\___| |_____/ \___|_| |_| .__/ \__|___/ "
10+
echo " | | "
11+
echo " |_| "
12+
echo """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
13+
14+
315
:CheckConnection
416
ping -n 1 google.com >nul
517
if %errorlevel%==0 (

CheckNetwork/CheckInternet.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
Write-Host " ____ _ _____ _ _ "
2+
Write-Host " | _ \| | / ____| (_) | | "
3+
Write-Host " | |_) | | __ _ _______ | (___ ___ _ __ _ _ __ | |_ ___ "
4+
Write-Host " | _ <| |/ _` |_ / _ \ \___ \ / __| '__| | '_ \| __/ __| "
5+
Write-Host " | |_) | | (_| |/ / __/ ____) | (__| | | | |_) | |_\__ \ "
6+
Write-Host " |____/|_|\__,_/___\___| |_____/ \___|_| |_| .__/ \__|___/ "
7+
Write-Host " | | "
8+
Write-Host " |_| "
9+
110
while ($true) {
211
try {
312
$pingResult = Test-Connection -ComputerName google.com -Count 1 -Quiet

CheckNetwork/pingGateway.bat

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
@echo off
22

3+
echo """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
4+
echo " ____ _ _____ _ _ "
5+
echo " | _ \| | / ____| (_) | | "
6+
echo " | |_) | | __ _ _______ | (___ ___ _ __ _ _ __ | |_ ___ "
7+
echo " | _ <| |/ _` |_ / _ \ \___ \ / __| '__| | '_ \| __/ __| "
8+
echo " | |_) | | (_| |/ / __/ ____) | (__| | | | |_) | |_\__ \ "
9+
echo " |____/|_|\__,_/___\___| |_____/ \___|_| |_| .__/ \__|___/ "
10+
echo " | | "
11+
echo " |_| "
12+
echo """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
13+
14+
315
:FindGateway
416
for /f "tokens=3" %%G in ('route print 0.0.0.0^|findstr "\<0.0.0.0\>"') do (
517
set "gateway=%%G"

CheckNetwork/pingGateway.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
Write-Host " ____ _ _____ _ _ "
2+
Write-Host " | _ \| | / ____| (_) | | "
3+
Write-Host " | |_) | | __ _ _______ | (___ ___ _ __ _ _ __ | |_ ___ "
4+
Write-Host " | _ <| |/ _` |_ / _ \ \___ \ / __| '__| | '_ \| __/ __| "
5+
Write-Host " | |_) | | (_| |/ / __/ ____) | (__| | | | |_) | |_\__ \ "
6+
Write-Host " |____/|_|\__,_/___\___| |_____/ \___|_| |_| .__/ \__|___/ "
7+
Write-Host " | | "
8+
Write-Host " |_| "
9+
110
$gateway = (Get-NetIPConfiguration | Where-Object { $_.IPv4DefaultGateway }).IPv4DefaultGateway.NextHop
211

312
function PingGateway {

Proxy/set_proxy.bat

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
@echo off
22

3+
echo """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
4+
echo " ____ _ _____ _ _ "
5+
echo " | _ \| | / ____| (_) | | "
6+
echo " | |_) | | __ _ _______ | (___ ___ _ __ _ _ __ | |_ ___ "
7+
echo " | _ <| |/ _` |_ / _ \ \___ \ / __| '__| | '_ \| __/ __| "
8+
echo " | |_) | | (_| |/ / __/ ____) | (__| | | | |_) | |_\__ \ "
9+
echo " |____/|_|\__,_/___\___| |_____/ \___|_| |_| .__/ \__|___/ "
10+
echo " | | "
11+
echo " |_| "
12+
echo """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
13+
314
set proxyAddress=proxy.example.com
415
set proxyPort=8080
516

Proxy/set_proxy.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
Write-Host " ____ _ _____ _ _ "
2+
Write-Host " | _ \| | / ____| (_) | | "
3+
Write-Host " | |_) | | __ _ _______ | (___ ___ _ __ _ _ __ | |_ ___ "
4+
Write-Host " | _ <| |/ _` |_ / _ \ \___ \ / __| '__| | '_ \| __/ __| "
5+
Write-Host " | |_) | | (_| |/ / __/ ____) | (__| | | | |_) | |_\__ \ "
6+
Write-Host " |____/|_|\__,_/___\___| |_____/ \___|_| |_| .__/ \__|___/ "
7+
Write-Host " | | "
8+
Write-Host " |_| "
9+
110
# Set proxy settings
211
$proxyAddress = "proxy.example.com"
312
$proxyPort = 8080
-61.6 KB
Binary file not shown.

ProxyImport-Export/proxyimport_export.bat

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
@echo off
22

3+
echo """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
4+
echo " ____ _ _____ _ _ "
5+
echo " | _ \| | / ____| (_) | | "
6+
echo " | |_) | | __ _ _______ | (___ ___ _ __ _ _ __ | |_ ___ "
7+
echo " | _ <| |/ _` |_ / _ \ \___ \ / __| '__| | '_ \| __/ __| "
8+
echo " | |_) | | (_| |/ / __/ ____) | (__| | | | |_) | |_\__ \ "
9+
echo " |____/|_|\__,_/___\___| |_____/ \___|_| |_| .__/ \__|___/ "
10+
echo " | | "
11+
echo " |_| "
12+
echo """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
13+
14+
315
REM Proxy Configuration Export/Import Script
416

517
set "exportFile=config_proxy.txt"

Readme.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ This component provides scripts for exporting and importing proxy configurations
5050

5151
Refer to the individual component folders for detailed instructions on how to use the scripts within each component.
5252

53+
### Character Art
54+
- Visit [patorjk.com](https://patorjk.com/software/taag/#p=display&f=Graffiti&t=Type%20Something%20)
55+
5356
## Contribution
5457

5558
Contributions to this repository are welcome! If you have improvements, bug fixes, or additional scripts related to Windows tasks, feel free to open a pull request. Please ensure that your contributions adhere to the repository's guidelines and standards.
@@ -64,4 +67,4 @@ The scripts are provided as-is, without any warranty or guarantee. The repositor
6467

6568
For further details and information, please refer to the individual script files and their respective documentation.
6669

67-
Happy scripting!
70+
Happy scripting! :smiley:

TraceRoute/Readme.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Trace Route
2+
3+
## In this batch script:
4+
5+
- Set the target variable to the domain or IP address you want to trace.
6+
- Set the maxHops variable to the maximum number of hops to trace.
7+
- The script iterates through each hop using a for /l loop.
8+
- For each hop, it retrieves the IP address using the tracert command and extracts it from the output.
9+
- It then sends a single ping to the IP address and extracts the response time from the output.
10+
- The hop information, including the IP address and response time, is displayed on the console.
11+
12+
## In this PowerShell script:
13+
14+
- The $target variable prompts the user to enter the domain name they want to trace.
15+
- The $maxHops variable specifies the maximum number of hops to trace.
16+
- The script iterates through each hop using a for loop.
17+
- For each hop, it uses tracert to retrieve the IP address from the output.
18+
- It then sends a single ping to the IP address and extracts the response time from the output.
19+
- The hop information, including the IP address and response time, is displayed on the console.
20+
21+
22+
## What is hop?
23+
24+
In the context of network communication, a "hop" refers to each intermediate network device (router) through which data packets pass on their way from the source to the destination. Each hop represents a point in the network where the packet is processed and forwarded towards its final destination.
25+
26+
Traceroute is a diagnostic tool used to trace the route that packets take from the source to the destination by incrementally increasing the "time-to-live" (TTL) value of the packets. Each time a packet encounters a router, the router decrements the TTL value by 1. When the TTL reaches zero, the router discards the packet and sends an ICMP "Time Exceeded" message back to the source. This allows the source to identify the router's IP address and measure the round-trip time (RTT) of the packet.
27+
28+
In the provided script, the `hop` variable represents the current hop number being traced. It starts from 1 and increments up to the maximum number of hops specified by the `maxHops` variable. The script performs a traceroute by sending ICMP packets with increasing TTL values, capturing the IP address and response time at each hop.

0 commit comments

Comments
 (0)