Log extractor
3 posters
Page 1 of 1
Log extractor
Hey!
I had nothing to do yesterday so I decided to code something that extacts all of IP-checks I've ever done. THIS S**T IS USEFUL so I decided to share it with you guys!
All you have to do is to:
1- Download and install wampserver from wampserver.com (Which allows you to execute PHP codes)
2-Copy the 'logs' folder from your cs2d folder and paste it in [Where-ever you've installed wamp]/www
3- Put this code there as well
4- Open wampserver, wait for it's icon in the task bar to turn green (Like this)
5- Open your browser and type 'localhost/dig.php'
It's done, now you can check 'users.txt' for your output, it'll be something like this -Output link-
Note: The time it takes depends on the 'logs' folder's size, don't panic if it took so long
Note2: This is a moderator tool and it will not work for you if you're not one.
I had nothing to do yesterday so I decided to code something that extacts all of IP-checks I've ever done. THIS S**T IS USEFUL so I decided to share it with you guys!
All you have to do is to:
1- Download and install wampserver from wampserver.com (Which allows you to execute PHP codes)
2-Copy the 'logs' folder from your cs2d folder and paste it in [Where-ever you've installed wamp]/www
3- Put this code there as well
4- Open wampserver, wait for it's icon in the task bar to turn green (Like this)
5- Open your browser and type 'localhost/dig.php'
It's done, now you can check 'users.txt' for your output, it'll be something like this -Output link-
Note: The time it takes depends on the 'logs' folder's size, don't panic if it took so long
Note2: This is a moderator tool and it will not work for you if you're not one.
Last edited by Soushiant.iR on Fri Sep 12, 2014 5:23 pm; edited 2 times in total (Reason for editing : oxy plis)
Re: Log extractor
Soushiant.iR wrote:
I found it quiet useful
Oxoby- Site user
- Gender : Posts : 55
Points : 69
Join date : 2014-09-07
Age : 24
Location : Kuala Lumpur
Re: Log extractor
You seem new to PHP, nice to hear you're learning about it now. We can fangirl about it once you do. :3
However, as your superior in PHP, I'd tell you that this script and idea has many issues.
First off, I've got 100mb of logs. Kenpachi has logs from 2012 and before probably. PHP is not suited for this kind of scripting. You should use a C++ console program for this.
Secondly,
Lastly, an advice. Look into some PDF Books about PHP. You can find tons on teh interwebs. And remember to use the latest ones as they've got information from the latest versions of PHP! AND for some PHP reference: http://www.w3schools.com/php/default.asp
Good luck.
EDIT: Another thing! Use "if and elses" to create make the PHP go with the flow!
e.g
However, as your superior in PHP, I'd tell you that this script and idea has many issues.
First off, I've got 100mb of logs. Kenpachi has logs from 2012 and before probably. PHP is not suited for this kind of scripting. You should use a C++ console program for this.
Secondly,
You need to edit the php config file for this too. It's way better to use a C++ console program for this.Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\dig.php on line 10
Lastly, an advice. Look into some PDF Books about PHP. You can find tons on teh interwebs. And remember to use the latest ones as they've got information from the latest versions of PHP! AND for some PHP reference: http://www.w3schools.com/php/default.asp
Good luck.
EDIT: Another thing! Use "if and elses" to create make the PHP go with the flow!
e.g
- Code:
if(scandir("logs"))
{
///echo output here
}else{
echo "Could not find/scan directory!";
}
Re: Log extractor
Well no. I just made a code that works, nothing else Dx.Mikasa*~ wrote:You seem new to PHP, nice to hear you're learning about it now. We can fangirl about it once you do. :3
I think that php is able to handle it, since the input can be given separately to handle the size issue. But I'll take a look at this 'C++ console program' you mentioned..Mikasa*~ wrote:However, as your superior in PHP, I'd tell you that this script and idea has many issues.
First off, I've got 100mb of logs. Kenpachi has logs from 2012 and before probably. PHP is not suited for this kind of scripting. You should use a C++ console program for this.
Well, since my logs and the files I've tried to read weren't that big, this... thing happened. So yes, I'll edit some parts in order to solve that. Thanks.Mikasa*~ wrote:Secondly,You need to edit the php config file for this too. It's way better to use a C++ console program for this.Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\dig.php on line 10
Lastly, an advice. Look into some PDF Books about PHP. You can find tons on teh interwebs. And remember to use the latest ones as they've got information from the latest versions of PHP! AND for some PHP reference: http://www.w3schools.com/php/default.asp
Good luck.
-I can still give the required data separately-
To be honest, returning errors wasn't my thing from the first day. Since I imagine the user as a creature with high enough intelligence to understand the walkthrough. -Even my debugging ways are different-.Mikasa*~ wrote:EDIT: Another thing! Use "if and elses" to create make the PHP go with the flow!
e.g
- Code:
if(scandir("logs"))
{
///echo output here
}else{
echo "Could not find/scan directory!";
}
Really appriciated your help, thx.
Re: Log extractor
Small update:
Add - set_time_limit(3600) - right below "< ?php" to extend the execution time
Another small update:
Made a few changes to the original code, you can now search for strings using this code
1-Put the string you're looking for in line 3-
2-Instructions in the first post-
3-localhost/textfinder.php-
Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\dig.php on line 10
(PHP 4, PHP 5)
set_time_limit (int seconds) — Limits the maximum execution time
Add - set_time_limit(3600) - right below "< ?php" to extend the execution time
Another small update:
Made a few changes to the original code, you can now search for strings using this code
1-Put the string you're looking for in line 3-
2-Instructions in the first post-
3-localhost/textfinder.php-
Re: Log extractor
Replacing "I found it quiet useful" to "THIS S**T IS USEFUL"
LMFAO
LMFAO
Oxoby- Site user
- Gender : Posts : 55
Points : 69
Join date : 2014-09-07
Age : 24
Location : Kuala Lumpur
Re: Log extractor
This topic won't be updated, check the progress from here
Project Extract by .Mikasa*~
Project Extract by .Mikasa*~
Nighthawk wrote:
Locked.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum