Simple proxy tester


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Simple proxy tester
# 1  
Old 05-25-2015
Simple proxy tester

This is a simple script to verify a proxy

Code:
type8code0@core:~$ cat proxy-tester
echo -e "\nTest proxy 10.10.10.10:80"
curl echoip.net --proxy 10.10.10.10:80
echo -e "\n\nTest proxy 10.10.10.11:80"
curl echoip.net --proxy 10.10.10.11:80
echo -e "\n\nTest proxy 10.10.10.13:80"
curl echoip.net --proxy 10.10.10.13:80
echo -e "\n\nDone :)\n"
type8code0@core:~$

### Plan to improve the script.
This script is working just fine. The problem is every time I have a new proxy list, I have to update the "proxy-tester" file manually.
Is there any better way to improve this code whereby the script can read the "PROXY-LIST.txt" file and put these proxies and port numbers to the script?

PROXY-LIST.txt
Quote:
10.10.10.10:80
10.10.10.11:80
10.10.10.13:80
# 2  
Old 05-25-2015
Have a read up on "while loops" in shell scripting. This should achieve what you are after.
This User Gave Thanks to pilnet101 For This Post:
# 3  
Old 05-25-2015
How about (untested):
Code:
while read IP
  do echo "Test proxy $IP"
     curl echoip.net --proxy "IP"
  done < proxy-list.txt

?
This User Gave Thanks to RudiC For This Post:
# 4  
Old 05-25-2015
Quote:
Originally Posted by RudiC
How about (untested):
Code:
while read IP
  do echo "Test proxy $IP"
     curl echoip.net --proxy "IP"
  done < proxy-list.txt

?
works like a charm

Code:
while read IP
  do echo "Test proxy $IP"
     curl echoip.net --proxy "$IP"
  done < proxy-list.txt

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. IP Networking

Connecting via proxy chain to Upstream proxy

I need to configure a proxy on my local machine to use an upstream proxy (installed on another machine). The upstream proxy requires Digest/NTLM authorization. I want the local proxy to deal with the upstream proxy's authorization details and provides authorization free access to users that connect... (0 Replies)
Discussion started by: Russel
0 Replies

2. Shell Programming and Scripting

Proxy socks tester issue

I have a list of ip socks / port(eg: 192.168.0.1 80). I would like to write a bash to test automatically these addresses in a loop with firefox. The problem is that firefox process stays alive even when firefox does not work because of wrong network settings. So I want to kill the process when the... (3 Replies)
Discussion started by: arpagon
3 Replies

3. Red Hat

Syslog.conf: looking for a simple answer on a simple question

Cheers! In /etc/syslog.conf, if an error type is not specified, is it logged anywhere (most preferable is it logged to /var/log/messages) or not? To be more precise I am interested in error and critical level messages. At default these errors are not specified in syslog.conf, and I need to... (6 Replies)
Discussion started by: dr1zzt3r
6 Replies

4. Shell Programming and Scripting

SIMPLE HTTP PROXY SERVER CHECKER (Completed)

Simple Http Proxy Server Checker Script with curl mirror proxies-scripts/proxc at master * Anoncheg1/proxies-scripts * GitHub output in terminal HTTP, HTTP Connect (HTTPS not supported) command line: proxc filename where filename is file like 119.110.69.185:8080 119.235.16.41:8080... (4 Replies)
Discussion started by: 654321
4 Replies

5. Shell Programming and Scripting

Help making simple perl or bash script to create a simple matrix

Hello all! This is my first post and I'm very new to programming. I would like help creating a simple perl or bash script that I will be using in my work as a junior bioinformatician. Essentially, I would like to take a tab-delimted or .csv text with 3 columns and write them to a "3D" matrix: ... (16 Replies)
Discussion started by: torchij
16 Replies

6. Shell Programming and Scripting

Bash Login tester Script help!

Hello, first of all, I am a pretty experience c++ programmer, but have never really bothered learning bash scripting at all, so I know conceptually things that can be done in c++, but I'm not too sure about bash. I'm trying to learn Bash, and wanted to start out with a practical application. So I... (1 Reply)
Discussion started by: RSPdev
1 Replies

7. HP-UX

begining to feel like a beta tester for emc :(

recently migrated from 5.2 to 6.1 EMC control center. proceeded to upgrade the master/host agents in our hp server env....when I encountered the following issues: # ipcs -mop IPC status from /dev/kmem as of Thu Jul 9 08:47:27 2009 T ID KEY MODE OWNER GROUP NATTCH CPID LPID Shared Memory:... (1 Reply)
Discussion started by: mr_manny
1 Replies

8. IP Networking

Software/tool to route an IP packet to proxy server and capture the Proxy reply as an

Hi, I am involved in a project on Debian. One of my requirement is to route an IP packet in my application to a proxy server and receive the reply from the proxy server as an IP packet. My application handles data at the IP frame level. My application creates an IP packet(with all the necessary... (0 Replies)
Discussion started by: Rajesh_BK
0 Replies

9. Shell Programming and Scripting

Simple to you not simple to me pattern matchin help

hey all, im new and my first question is: say i have a word "blahblah" how do i get and replace the last letter of the word with say k, so replace the h with a k. However you cant just replace the h it has to change the LAST LETTER of the word. Cheers In advance. :b: (0 Replies)
Discussion started by: aleks001
0 Replies

10. UNIX for Dummies Questions & Answers

Ok simple question for simple knowledge...

Ok what is BSD exactly? I know its a type of open source but what is it exactly? (1 Reply)
Discussion started by: Corrail
1 Replies
Login or Register to Ask a Question