Page 1 of 3 123 Last
  • Jump to page:
    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    38
    Rep Power
    2

    Log File Analysis


    Goal: Write a program that analyzes a web server's log file to determine which computers have attempted to access that web server the most.

    Output when 'small.log' file is entered.
    Enter a log file to be analyzed
    Found 11 unique IP addresses.
    The most suspicious are:
    209.129.94.61 (10 erroneous accesses)
    207.42.179.85 (4 erroneous accesses)
    75.128.10.211 (3 erroneous accesses)

    Contents of 'small.log' file.
    [Wed Jun 30 20:02:53 2010] [error] [client 209.129.94.61] File does not exist: C:/site/hancocktools.com/_vti_inf.html
    [Wed Jun 30 20:02:53 2010] [error] [client 209.129.94.61] File does not exist: C:/site/hancocktools.com/_vti_bin
    [Thu Jul 01 04:57:03 2010] [error] [client 67.218.116.163] File does not exist: C:/site/hypergrade.com/robots.txt
    [Thu Jul 01 06:35:44 2010] [error] [client 66.249.65.120] File does not exist: C:/site/hypergrade.com/robots.txt
    [Thu Jul 01 08:52:18 2010] [error] [client 207.46.204.244] File does not exist: C:/site/hypergrade.com/robots.txt
    [Thu Jul 01 12:47:04 2010] [error] [client 72.14.199.153] File does not exist: C:/site/hypergrade.com/robots.txt
    [Thu Jul 01 16:15:00 2010] [error] [client 178.154.163.29] File does not exist: C:/site/hypergrade.com/robots.txt
    [Thu Jul 01 16:24:44 2010] [error] [client 72.14.199.153] File does not exist: C:/site/hypergrade.com/robots.txt
    [Thu Jul 01 18:19:01 2010] [error] [client 209.129.94.61] File does not exist: C:/site/hancocktools.com/_vti_inf.html
    [Thu Jul 01 18:19:01 2010] [error] [client 209.129.94.61] File does not exist: C:/site/hancocktools.com/_vti_bin
    [Thu Jul 01 18:19:01 2010] [error] [client 209.129.94.61] File does not exist: C:/site/hancocktools.com/_vti_inf.html
    [Thu Jul 01 18:19:01 2010] [error] [client 209.129.94.61] File does not exist: C:/site/hancocktools.com/_vti_bin
    [Thu Jul 01 18:22:02 2010] [error] [client 209.129.94.61] File does not exist: C:/site/hancocktools.com/_vti_inf.html
    [Thu Jul 01 18:22:02 2010] [error] [client 209.129.94.61] File does not exist: C:/site/hancocktools.com/_vti_bin
    [Thu Jul 01 18:22:02 2010] [error] [client 209.129.94.61] File does not exist: C:/site/hancocktools.com/_vti_inf.html
    [Thu Jul 01 18:22:02 2010] [error] [client 209.129.94.61] File does not exist: C:/site/hancocktools.com/_vti_bin
    [Fri Jul 02 06:09:43 2010] [error] [client 66.249.68.146] File does not exist: C:/site/hypergrade.com/robots.txt
    [Fri Jul 02 07:58:31 2010] [error] [client 207.42.179.85] File does not exist: C:/site/hancockfaculty.com/phpmyadmin
    [Fri Jul 02 07:58:32 2010] [error] [client 207.42.179.85] File does not exist: C:/site/hancockfaculty.com/phpMyAdmin
    [Fri Jul 02 07:58:33 2010] [error] [client 207.42.179.85] File does not exist: C:/site/hancockfaculty.com/PMA
    [Fri Jul 02 07:58:34 2010] [error] [client 207.42.179.85] File does not exist: C:/site/hancockfaculty.com/pma
    [Fri Jul 02 17:54:00 2010] [error] [client 209.85.238.118] File does not exist: C:/site/hypergrade.com/robots.txt
    [Fri Jul 02 23:24:13 2010] [error] [client 75.128.10.211] script 'C:/site/hancocktools.com/classes/cs122.php' not found or unable to stat
    [Fri Jul 02 23:32:49 2010] [error] [client 75.128.10.211] File does not exist: C:/site/hancocktools.com/cs102/lecture/cs102-topic14.ppt, referer: http://www.hancocktools.com/cs102.php
    [Fri Jul 02 23:32:54 2010] [error] [client 75.128.10.211] File does not exist: C:/site/hancocktools.com/cs102/lecture/cs102-topic14.ppt, referer: http://www.hancocktools.com/cs102.php
    [Sat Jul 03 09:17:37 2010] [error] [client 221.192.199.35] client denied by server configuration: C:/site/hancockfaculty.com/prx2.php
    [Sat Jul 03 13:10:46 2010] [error] [client 66.249.68.146] File does not exist: C:/site/hypergrade.com/robots.txt
    [Sat Jul 03 21:08:00 2010] [error] [client 178.154.163.29] File does not exist: C:/site/hypergrade.com/robots.txt
    [Sat Jul 03 23:42:21 2010] [error] [client 209.85.238.118] File does not exist: C:/site/hypergrade.com/robots.txt


    My code so far

    Code:
    import java.io.*;
    import java.util.*;
    
    public class LogFileAnalysis 
    {
    	
    	public static void main (String[] args)
    	{
    		
    		Scanner keys = new Scanner (System.in);
    		System.out.println("Enter a log file to be analyzed");
    		String file = "";
    		file = keys.nextLine();
    		File f = new File(file);
    		
    		Map<String, String> map = new TreeMap<String, String>();
    		Set<String> set = new HashSet<String>();
    		
    		try 
    		{
    			
    			Scanner s = new Scanner(f);
    			
    			while(s.hasNextLine())
    			{
    				String input = s.nextLine();
    				set.add(input);
    				System.out.println(input);
    				
    			}
    			s.close();
    		}
    		
    		catch (FileNotFoundException e) 
    		{
    			System.out.println("Couldn't open file");
    		}
    	}
    	
    }
    What I'm trying to do

    To get the number of unique IP addresses, I'm trying to add the file into a set. Because a set does not allow duplicates, I can add each IP address to the set. To count the number of unique IP addresses, I would call the size method for the set. The problem I am having is actually getting the file into the set. I also know I need to make it so the set only reads the IP addresses, and I'm not exactly sure how to proceed with this.

    To output the IP address along with the number of erroneous accesses, it looks like I would use a map. I could map the IP address to how many times it occurred. I could do this by iterating through the map.

    Any ideas on how I can accomplish these tasks? I've tried different ways to add the file into a set, but I have had no luck. Any ideas?
  2. #2
  3. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,714
    Rep Power
    348
    problem I am having is actually getting the file into the set
    What part of the line from the file do you want to add to the set.
    The add() method is a way to add items to a set. You need to extract the substring from the line that has the data that you want to save and count.

    What is the problem with the code you have posted?


    You might consider using a Map. The key would be the client info and the data could be a list of the lines from the file for that client.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    38
    Rep Power
    2
    What I was thinking was adding each of these lines

    [Wed Jun 30 20:02:53 2010] [error] [client 209.129.94.61] File does not exist: C:/site/hancocktools.com/_vti_inf.html

    to the set. Because a set doesn't allow duplicates, I can just use the size method to count the number of unique IP addresses. I know I would have to use something like substring(45,58) to extract the IP address (even though I would have to manipulate that last number because not all of the IP addresses have the same grouping of numbers. I tried adding an item to the set using the add() method, but when I tested to see what I put in my set, all I could see in the output was "java.lang" something.

    I did consider using a map, but for counting the number of times each IP address was erroneously accessed.



    Originally Posted by NormR
    What part of the line from the file do you want to add to the set.
    The add() method is a way to add items to a set. You need to extract the substring from the line that has the data that you want to save and count.

    What is the problem with the code you have posted?


    You might consider using a Map. The key would be the client info and the data could be a list of the lines from the file for that client.
  6. #4
  7. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,714
    Rep Power
    348
    adding each of these lines
    Aren't most of the lines unique?

    all I could see in the output was "java.lang" something.
    You'll have to copy and paste here what was printed out to get any help with it.

    I did consider using a map, but for counting the number of times each IP address was erroneously accessed.
    Can you explain the problem with using a Map? Did you understand my suggestion for using a Map?
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    38
    Rep Power
    2
    Originally Posted by NormR
    Aren't most of the lines unique?
    There are 11 unique IP addresses in the small.log file.


    You'll have to copy and paste here what was printed out to get any help with it.
    Code:
    import java.io.*;
    import java.util.*;
    
    public class LogFileAnalysis 
    {
    	
    	public static void main (String[] args)
    	{
    		
    		Scanner keys = new Scanner (System.in);
    		System.out.println("Enter a log file to be analyzed");
    		String file = "";
    		file = keys.nextLine();
    		File f = new File(file);
    		
    		Map<String, String> map = new TreeMap<String, String>();
    		Set<String> set = new HashSet<String>();
    		
    		try 
    		{
    			
    			Scanner s = new Scanner(f);
    			
    			
    			while(s.hasNextLine())
    			{
    				String input = s.nextLine();
    				set.add(input);
    				System.out.println(input);
    				
    			}
    			
    			System.out.println(set.toArray());
    			System.out.println(set.iterator());
    			s.close();
    		}
    		
    		catch (FileNotFoundException e) 
    		{
    			System.out.println("Couldn't open file");
    		}
    	}
    	
    }
    Output

    [Wed Jun 30 20:02:53 2010] [error] [client 209.129.94.61] File does not exist: C:/site/hancocktools.com/_vti_inf.html
    [Wed Jun 30 20:02:53 2010] [error] [client 209.129.94.61] File does not exist: C:/site/hancocktools.com/_vti_bin
    [Thu Jul 01 04:57:03 2010] [error] [client 67.218.116.163] File does not exist: C:/site/hypergrade.com/robots.txt
    [Thu Jul 01 06:35:44 2010] [error] [client 66.249.65.120] File does not exist: C:/site/hypergrade.com/robots.txt
    [Thu Jul 01 08:52:18 2010] [error] [client 207.46.204.244] File does not exist: C:/site/hypergrade.com/robots.txt
    [Thu Jul 01 12:47:04 2010] [error] [client 72.14.199.153] File does not exist: C:/site/hypergrade.com/robots.txt
    [Thu Jul 01 16:15:00 2010] [error] [client 178.154.163.29] File does not exist: C:/site/hypergrade.com/robots.txt
    [Thu Jul 01 16:24:44 2010] [error] [client 72.14.199.153] File does not exist: C:/site/hypergrade.com/robots.txt
    [Thu Jul 01 18:19:01 2010] [error] [client 209.129.94.61] File does not exist: C:/site/hancocktools.com/_vti_inf.html
    [Thu Jul 01 18:19:01 2010] [error] [client 209.129.94.61] File does not exist: C:/site/hancocktools.com/_vti_bin
    [Thu Jul 01 18:19:01 2010] [error] [client 209.129.94.61] File does not exist: C:/site/hancocktools.com/_vti_inf.html
    [Thu Jul 01 18:19:01 2010] [error] [client 209.129.94.61] File does not exist: C:/site/hancocktools.com/_vti_bin
    [Thu Jul 01 18:22:02 2010] [error] [client 209.129.94.61] File does not exist: C:/site/hancocktools.com/_vti_inf.html
    [Thu Jul 01 18:22:02 2010] [error] [client 209.129.94.61] File does not exist: C:/site/hancocktools.com/_vti_bin
    [Thu Jul 01 18:22:02 2010] [error] [client 209.129.94.61] File does not exist: C:/site/hancocktools.com/_vti_inf.html
    [Thu Jul 01 18:22:02 2010] [error] [client 209.129.94.61] File does not exist: C:/site/hancocktools.com/_vti_bin
    [Fri Jul 02 06:09:43 2010] [error] [client 66.249.68.146] File does not exist: C:/site/hypergrade.com/robots.txt
    [Fri Jul 02 07:58:31 2010] [error] [client 207.42.179.85] File does not exist: C:/site/hancockfaculty.com/phpmyadmin
    [Fri Jul 02 07:58:32 2010] [error] [client 207.42.179.85] File does not exist: C:/site/hancockfaculty.com/phpMyAdmin
    [Fri Jul 02 07:58:33 2010] [error] [client 207.42.179.85] File does not exist: C:/site/hancockfaculty.com/PMA
    [Fri Jul 02 07:58:34 2010] [error] [client 207.42.179.85] File does not exist: C:/site/hancockfaculty.com/pma
    [Fri Jul 02 17:54:00 2010] [error] [client 209.85.238.118] File does not exist: C:/site/hypergrade.com/robots.txt
    [Fri Jul 02 23:24:13 2010] [error] [client 75.128.10.211] script 'C:/site/hancocktools.com/classes/cs122.php' not found or unable to stat
    [Fri Jul 02 23:32:49 2010] [error] [client 75.128.10.211] File does not exist: C:/site/hancocktools.com/cs102/lecture/cs102-topic14.ppt, referer: http://www.hancocktools.com/cs102.php
    [Fri Jul 02 23:32:54 2010] [error] [client 75.128.10.211] File does not exist: C:/site/hancocktools.com/cs102/lecture/cs102-topic14.ppt, referer: http://www.hancocktools.com/cs102.php
    [Sat Jul 03 09:17:37 2010] [error] [client 221.192.199.35] client denied by server configuration: C:/site/hancockfaculty.com/prx2.php
    [Sat Jul 03 13:10:46 2010] [error] [client 66.249.68.146] File does not exist: C:/site/hypergrade.com/robots.txt
    [Sat Jul 03 21:08:00 2010] [error] [client 178.154.163.29] File does not exist: C:/site/hypergrade.com/robots.txt
    [Sat Jul 03 23:42:21 2010] [error] [client 209.85.238.118] File does not exist: C:/site/hypergrade.com/robots.txt
    [Ljava.lang.Object;@37a786c3
    java.util.HashMap$KeyIterator@578088c0

    ----------------------------------

    The only reason why I have toArray and Iterator in there is because I'm trying to see if I successfully added the file into the set. And I know the reason the entire file is being printed out is because of System.out.println(input);


    Can you explain the problem with using a Map? Did you understand my suggestion for using a Map?
    Are you suggesting I make the String 'client' with the IP address map to each other?
  10. #6
  11. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,714
    Rep Power
    348
    suggesting I make the String 'client' with the IP address
    Yes that would be the key, the value would be an arraylist of all the lines containing that key.

    [Ljava.lang.Object;@37a786c3
    That is what would be printed for an array of Objects. To format the array for printing, use the Arrays class's toString() method.

    java.util.HashMap$KeyIterator@578088c0
    That would be what a KeyIterator object would display when printed.
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    38
    Rep Power
    2
    Originally Posted by NormR
    Yes that would be the key, the value would be an arraylist of all the lines containing that key.
    Just so I'm reading this right. I would have a map like this...

    Map<String, ArrayList> map = new TreeMap<String, ArrayList>();

    List<String> list = new MyArrayList<String>();


    That is what would be printed for an array of Objects. To format the array for printing, use the Arrays class's toString() method.
    The toString method prints out everything on one line. Is there a way I can put them on separate lines, so it's easier to use substring to get the data I want?
  14. #8
  15. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,714
    Rep Power
    348
    the toString method prints out everything on one line.
    The toString() method returns a String. It doesn't print anything. I use it for debuging to see what is in an array.
    Where is the data the you want to get access to? If it is in an array, use normal array indexing to get at the array's contents.

    The collections definitions look about right. You should specify what the ArrayList in the Map will hold. Type the code into a class and compile it to let the compiler verify it.
    Last edited by NormR; November 30th, 2012 at 04:37 PM.
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    38
    Rep Power
    2
    Where is the data the you want to get access to?
    Here is one line from the 'small.log' file

    [Wed Jun 30 20:02:53 2010] [error] [client 209.129.94.61] File does not exist: C:/site/hancocktools.com/_vti_inf.html

    What I have in bold, is what I want access to. There are about 30 of these lines, the IP addresses may be the same or they may be different. Not all the lines are the same, though.
  18. #10
  19. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,714
    Rep Power
    348
    Look at the String class's methods for finding where the data is located. What two Strings is it between? And for a method to get that data as substring.
  20. #11
  21. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    38
    Rep Power
    2
    Here is my current code.

    Code:
    import java.io.*;
    import java.util.*;
    
    public class LogFileAnalysis 
    {
    	
    	public static void main (String[] args)
    	{
    		
    		Scanner keys = new Scanner (System.in);
    		System.out.println("Enter a log file to be analyzed");
    		String file = "";
    		file = keys.nextLine();
    		File f = new File(file);
    		
    		Map<String, ArrayList> map = new TreeMap<String, ArrayList>();
    		List<String> list = new ArrayList<String>();
    		Set<String> set = new HashSet<String>();
    		
    		try 
    		{
    			
    			Scanner s = new Scanner(f);
    			
    			while(s.hasNextLine())
    			{
    				String input = s.nextLine();
    				input.replaceAll("\\s", "");
    				input = input.replaceAll("]", "");
    				System.out.println(input.substring(40, 55));
    				list.add(input);
    				System.out.println(list.toArray());
    			}
    			s.close();
    		}
    		
    		catch (FileNotFoundException e) 
    		{
    			System.out.println("Couldn't open file");
    		}
    	}
    	
    }
    Output
    209.129.94.61
    209.129.94.61
    67.218.116.163
    66.249.65.120
    207.46.204.244
    72.14.199.153
    178.154.163.29
    72.14.199.153
    209.129.94.61
    209.129.94.61
    209.129.94.61
    209.129.94.61
    209.129.94.61
    209.129.94.61
    209.129.94.61
    209.129.94.61
    66.249.68.146
    207.42.179.85
    207.42.179.85
    207.42.179.85
    207.42.179.85
    209.85.238.118
    75.128.10.211
    75.128.10.211
    75.128.10.211
    221.192.199.35
    66.249.68.146
    178.154.163.29
    209.85.238.118

    This is the data I want access to. I tried adding this particular data to one of the collections, but when I print out whatever is in the collection, I don't get just the IP addresses.
  22. #12
  23. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,714
    Rep Power
    348
    when I print out whatever is in the collection, I don't get just the IP addresses.
    Please post what is printed out so we can see the problem.

    Hardcode substring indexes won't work if the data is different lengths. You need to find the delimiting substrings to localize the Strings you want.
    Last edited by NormR; November 30th, 2012 at 05:58 PM.
  24. #13
  25. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    38
    Rep Power
    2
    Originally Posted by NormR
    Please post what is printed out so we can see the problem.
    Enter a log file to be analyzed
    small.log
    209.129.94.61
    [Wed Jun 30 20:02:53 2010 [error [client 209.129.94.61 File does not exist: C:/site/hancocktools.com/_vti_inf.html
    209.129.94.61
    [Wed Jun 30 20:02:53 2010 [error [client 209.129.94.61 File does not exist: C:/site/hancocktools.com/_vti_bin
    67.218.116.163
    [Thu Jul 01 04:57:03 2010 [error [client 67.218.116.163 File does not exist: C:/site/hypergrade.com/robots.txt
    66.249.65.120
    [Thu Jul 01 06:35:44 2010 [error [client 66.249.65.120 File does not exist: C:/site/hypergrade.com/robots.txt
    207.46.204.244
    [Thu Jul 01 08:52:18 2010 [error [client 207.46.204.244 File does not exist: C:/site/hypergrade.com/robots.txt
    72.14.199.153
    [Thu Jul 01 12:47:04 2010 [error [client 72.14.199.153 File does not exist: C:/site/hypergrade.com/robots.txt
    178.154.163.29
    [Thu Jul 01 16:15:00 2010 [error [client 178.154.163.29 File does not exist: C:/site/hypergrade.com/robots.txt
    72.14.199.153
    [Thu Jul 01 16:24:44 2010 [error [client 72.14.199.153 File does not exist: C:/site/hypergrade.com/robots.txt
    209.129.94.61
    [Thu Jul 01 18:19:01 2010 [error [client 209.129.94.61 File does not exist: C:/site/hancocktools.com/_vti_inf.html
    209.129.94.61
    [Thu Jul 01 18:19:01 2010 [error [client 209.129.94.61 File does not exist: C:/site/hancocktools.com/_vti_bin
    209.129.94.61
    [Thu Jul 01 18:19:01 2010 [error [client 209.129.94.61 File does not exist: C:/site/hancocktools.com/_vti_inf.html
    209.129.94.61
    [Thu Jul 01 18:19:01 2010 [error [client 209.129.94.61 File does not exist: C:/site/hancocktools.com/_vti_bin
    209.129.94.61
    [Thu Jul 01 18:22:02 2010 [error [client 209.129.94.61 File does not exist: C:/site/hancocktools.com/_vti_inf.html
    209.129.94.61
    [Thu Jul 01 18:22:02 2010 [error [client 209.129.94.61 File does not exist: C:/site/hancocktools.com/_vti_bin
    209.129.94.61
    [Thu Jul 01 18:22:02 2010 [error [client 209.129.94.61 File does not exist: C:/site/hancocktools.com/_vti_inf.html
    209.129.94.61
    [Thu Jul 01 18:22:02 2010 [error [client 209.129.94.61 File does not exist: C:/site/hancocktools.com/_vti_bin
    66.249.68.146
    [Fri Jul 02 06:09:43 2010 [error [client 66.249.68.146 File does not exist: C:/site/hypergrade.com/robots.txt
    207.42.179.85
    [Fri Jul 02 07:58:31 2010 [error [client 207.42.179.85 File does not exist: C:/site/hancockfaculty.com/phpmyadmin
    207.42.179.85
    [Fri Jul 02 07:58:32 2010 [error [client 207.42.179.85 File does not exist: C:/site/hancockfaculty.com/phpMyAdmin
    207.42.179.85
    [Fri Jul 02 07:58:33 2010 [error [client 207.42.179.85 File does not exist: C:/site/hancockfaculty.com/PMA
    207.42.179.85
    [Fri Jul 02 07:58:34 2010 [error [client 207.42.179.85 File does not exist: C:/site/hancockfaculty.com/pma
    209.85.238.118
    [Fri Jul 02 17:54:00 2010 [error [client 209.85.238.118 File does not exist: C:/site/hypergrade.com/robots.txt
    75.128.10.211
    [Fri Jul 02 23:24:13 2010 [error [client 75.128.10.211 script 'C:/site/hancocktools.com/classes/cs122.php' not found or unable to stat
    75.128.10.211
    [Fri Jul 02 23:32:49 2010 [error [client 75.128.10.211 File does not exist: C:/site/hancocktools.com/cs102/lecture/cs102-topic14.ppt, referer: http://www.hancocktools.com/cs102.php
    75.128.10.211
    [Fri Jul 02 23:32:54 2010 [error [client 75.128.10.211 File does not exist: C:/site/hancocktools.com/cs102/lecture/cs102-topic14.ppt, referer: http://www.hancocktools.com/cs102.php
    221.192.199.35
    [Sat Jul 03 09:17:37 2010 [error [client 221.192.199.35 client denied by server configuration: C:/site/hancockfaculty.com/prx2.php
    66.249.68.146
    [Sat Jul 03 13:10:46 2010 [error [client 66.249.68.146 File does not exist: C:/site/hypergrade.com/robots.txt
    178.154.163.29
    [Sat Jul 03 21:08:00 2010 [error [client 178.154.163.29 File does not exist: C:/site/hypergrade.com/robots.txt
    209.85.238.118
    [Sat Jul 03 23:42:21 2010 [error [client 209.85.238.118 File does not exist: C:/site/hypergrade.com/robots.txt

    I'm trying to get only the IP addresses in a collection, and then I work with it, and get the number of unique IP addresses, etc.
  26. #14
  27. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,714
    Rep Power
    348
    What did you last post show? Was there a problem or is the output what you expected?
  28. #15
  29. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    38
    Rep Power
    2
    Originally Posted by NormR
    What did you last post show? Was there a problem or is the output what you expected?
    The last post showed everything in the file, and the only the IP addresses. I'm trying to get only the IP addresses in the set. So, when I call the set, only the IP addresses print out.
Page 1 of 3 123 Last
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo