473,394 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

I want to make this script working automatic and get target from file.txt

Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2.  
  3. use HTTP::Request;
  4. use LWP::UserAgent;
  5.  
  6. system('cls');
  7. system "color 0a";
  8. print"\n";
  9.  
  10. print " Please Enter IP\n Example: 192.168.1.1 or 192.168.1.1/path\n-> ";
  11. $site=<STDIN>;
  12. chomp $site;
  13.  
  14. print "\n";
  15. print "source code\n\n 1 = php\n\n-> ";
  16. $code=<STDIN>;
  17. chomp($code);
  18.  
  19. if ( $site !~ /^http:/ ) {
  20. $site = 'http://' . $site;
  21. }
  22. if ( $site !~ /\/$/ ) {
  23. $site = $site . '/';
  24. }
  25. print "\n";
  26.  
  27. print "-> Target: $site\n";
  28. print "-> Site source code: $code\n";
============================
this script make me put the website manual and site by site
how ican make it take alot of site's from file.txt
Oct 8 '12 #1
2 1490
Rabbit
12,516 Expert Mod 8TB
Please use code tags when posting code.

What you want to do is open a file handler and loop through the file reading it line by line.
Oct 8 '12 #2
numberwhun
3,509 Expert Mod 2GB
In order to do what you want, your going to have to populate a file with the URL's (preferably one per line). Then, read in the file and process each URL in turn.

The things your going to research on how to use are things like the open function and also how to read a file into an array (or just how to read each line from a file in turn. hint: foreach would work).

If you get stuck, post your code here with questions and any errors.

Regards,

Jeff
Oct 10 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: sachin | last post by:
hi, I have link on my html page. when user click it it should call my.php in my.php i am getting result from database and want to show result in *.xls file. Can i call my.php/my.xls from my link...
3
by: The Dana's | last post by:
I need to create a static HTML file that runs only on the local client PC. On the page (say PageA.htm), I would like for a hypelink to another page (Page B) to appear ONLY if the target file the...
1
by: John | last post by:
How do I get the file path(target file) of a short-cut icon if I'm writing my application in C#.
1
by: moonriver | last post by:
In a xml file, can we make reference to another xml file so that all contents of the latter xml file will be included into the first xml file? Had better give me an example for details.
1
by: ABC | last post by:
Is there any best solution automatic delete file within the special time? My web application can generate many pdf files for users. Because there are many users, I need to control the total...
1
by: naughty | last post by:
hi i want a script for open a pdf file not asked for open/save. please help me
0
by: Renil | last post by:
Hi, I am getting an error "Cannot take the address of, get the size of, or declare a pointer to a managed type" while working with PE file reading.. I'm adding the code below byte Data = new...
3
by: tariqanwar | last post by:
hi..... can any body give me a java script for automatic form filling
1
by: ajay m | last post by:
hi.. i am new to perl, i need a perl script for adding a file from local machine to perforce version control.... plz help me....
2
by: sagarneo11 | last post by:
how to make script for hiding the field by radio button in the document in the adobe livecycle designer 8.0
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.