Skip to content

Commit f52e152

Browse files
committed
import_export script
1 parent cb3a5c8 commit f52e152

File tree

2 files changed

+57
-1
lines changed

2 files changed

+57
-1
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Proxy Configuration Export/Import Script
2+
3+
$exportFile = "config_proxy.txt"
4+
$importFile = "config_proxy.txt"
5+
6+
# Export Proxy Configuration
7+
function ExportProxyConfiguration {
8+
Write-Host "Exporting proxy configuration..."
9+
reg export "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" $exportFile /y
10+
Write-Host "Proxy configuration exported to $exportFile."
11+
}
12+
13+
# Import Proxy Configuration
14+
function ImportProxyConfiguration {
15+
Write-Host "Importing proxy configuration..."
16+
reg import $importFile
17+
Write-Host "Proxy configuration imported from $importFile."
18+
}
19+
20+
# Main Menu
21+
do {
22+
Clear-Host
23+
24+
Write-Host """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
25+
Write-Host " ____ _ _____ _ _ "
26+
Write-Host " | _ \| | / ____| (_) | | "
27+
Write-Host " | |_) | | __ _ _______ | (___ ___ _ __ _ _ __ | |_ ___ "
28+
Write-Host " | _ <| |/ _` |_ / _ \ \___ \ / __| '__| | '_ \| __/ __| "
29+
Write-Host " | |_) | | (_| |/ / __/ ____) | (__| | | | |_) | |_\__ \ "
30+
Write-Host " |____/|_|\__,_/___\___| |_____/ \___|_| |_| .__/ \__|___/ "
31+
Write-Host " | | "
32+
Write-Host " |_| "
33+
Write-Host """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
34+
35+
Write-Host "Proxy Configuration Export/Import Script"
36+
Write-Host "----------------------------------------"
37+
Write-Host "1. Export Proxy Configuration"
38+
Write-Host "2. Import Proxy Configuration"
39+
Write-Host "3. Exit"
40+
Write-Host
41+
42+
$choice = Read-Host "Enter your choice (1-3): "
43+
44+
# Perform selected action
45+
switch ($choice) {
46+
"1" { ExportProxyConfiguration }
47+
"2" { ImportProxyConfiguration }
48+
"3" { exit }
49+
default { Write-Host "Invalid choice. Please try again." }
50+
}
51+
52+
Write-Host
53+
Read-Host "Press Enter to continue..."
54+
}
55+
while ($true)
56+

Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ This component contains scripts related to proxy configuration management.
4141
This component provides scripts for exporting and importing proxy configurations.
4242

4343
- `Readme.md:` Instructions and details specific to the ProxyImport-Export scripts.
44-
- `config_proxy.txt`: A sample file used for exporting and importing proxy configurations.
4544
- `proxyimport_export.bat`: A batch script that allows for the export and import of proxy configurations.
45+
- `proxyimport_export.ps1`: A powershell script that allows for the export and import of proxy configurations.
4646

4747
### 4. [TraceRoute](/TraceRoute/Readme.md)
4848

0 commit comments

Comments
 (0)