{"id":19341790,"url":"https://github.com/elb4rto/craplog-guiaidedcli","last_synced_at":"2025-08-08T07:08:18.393Z","repository":{"id":103723849,"uuid":"396767798","full_name":"elB4RTO/craplog-GUIaidedCLI","owner":"elB4RTO","description":"Parse Apache2 logs to create statistics","archived":false,"fork":false,"pushed_at":"2023-02-11T23:27:55.000Z","size":117,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T08:45:47.400Z","etag":null,"topics":["apache2-logs","cli","gui","python3","statistics"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elB4RTO.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-16T11:41:37.000Z","updated_at":"2022-06-19T23:00:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"aba61267-a2d6-4dbd-987e-beee4a89b765","html_url":"https://github.com/elB4RTO/craplog-GUIaidedCLI","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/elB4RTO/craplog-GUIaidedCLI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elB4RTO%2Fcraplog-GUIaidedCLI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elB4RTO%2Fcraplog-GUIaidedCLI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elB4RTO%2Fcraplog-GUIaidedCLI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elB4RTO%2Fcraplog-GUIaidedCLI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elB4RTO","download_url":"https://codeload.github.com/elB4RTO/craplog-GUIaidedCLI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elB4RTO%2Fcraplog-GUIaidedCLI/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269379404,"owners_count":24407411,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache2-logs","cli","gui","python3","statistics"],"created_at":"2024-11-10T03:32:28.321Z","updated_at":"2025-08-08T07:08:18.337Z","avatar_url":"https://github.com/elB4RTO.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Craplog GUI-aided CLI\nParse Apache2 logs to create statistics\n\n\u003cbr/\u003e\n\n# WARNING !\n\n***THIS VERSION IS UN-MANTAINED***\n\nPLEASE REFER TO THE [OTHER VERSIONS OF **CRAPLOG**](https://github.com/elB4RTO/CRAPLOG#official-versions) TO FIND MORE ADVANCED VERSIONS\n\nSEE [**The Craplog Project**](https://github.com/users/elB4RTO/projects/1) IF YOU WANT TO NOW MORE\n\n\u003cbr/\u003e\n\n## Overview\n\nCraplog is a tool that takes Apache2 logs in their default form, scrapes them and creates simple statistics.\u003cbr/\u003e\nIt's meant to be ran daily.\u003cbr/\u003e\u003cbr/\u003e\n\n![screenshot](https://raw.githubusercontent.com/elB4RTO/screenshots/main/Craplog/GUIaidedCLI/launcher.png)\u003cbr/\u003e\u003cbr/\u003e\n\nThis is a Graphical-aided version of Craplog.\u003cbr/\u003e\nThe GUI is just a launcher, Craplog still relies on a terminal.\n\n![screenshot](https://raw.githubusercontent.com/elB4RTO/screenshots/main/Craplog/GUIaidedCLI/craplog.png)\u003cbr/\u003e\u003cbr/\u003e\n\nDon't like it? Try the [other versions of Craplog](https://github.com/elB4RTO/CRAPLOG#official-versions)\n\n\u003cbr/\u003e\n\n### Side note\n\nThis Graphical version of Craplog is still dependant on terminal emulators for the main code's execution.\u003cbr/\u003e\nDifferent terminals means different behaviors. If you're experiencing issues during execution, try to switch to another terminal (bottom-left button).\n\n\u003cbr/\u003e\u003cbr/\u003e\n\n## Dependencies\n\n- **tk**   ( *tkinter* )\n\n\u003cbr/\u003e\n\n## Usage with installation\n\n```\nchmod +x ./install.sh\n./install.sh\ncraplog\n```\n\n\u003cbr/\u003e\n\n## Usage without installation\n\n```\npython3 craplog.py\n```\n\u003cbr/\u003e\u003cbr/\u003e\n\n## Log files\n\nAt the moment, it only supports **Apache2** log files in their **default** form and path\u003cbr/\u003e\nIf you're using a different path, please open the file named **Clean.py** (you can find it inside the folder named *crappy*) and **modify** these lines:\u003cbr/\u003e\n- [9](https://github.com/elB4RTO/craplog-GUIaidedCLI/blob/main/craplog/crappy/Clean.py#L9) **]** for the *access.log.1* file\u003cbr/\u003e\n- [70](https://github.com/elB4RTO/craplog-GUIaidedCLI/blob/main/craplog/crappy/Clean.py#L70) **]** for the *error.log.1* file\n\n\u003cbr/\u003e\n\n## Default logs path\n\n/var/log/apache2/\n\n\u003cbr/\u003e\n\n## Default logs form\n\n\n### access.log.1\n\nIP - - [DATE:TIME] \"REQUEST URI\" RESPONSE \"FROM URL\" \"USER AGENT\"\u003cbr/\u003e\n*123.123.123.123 - - [01/01/2000:00:10:20 +0000] \"GET /style.css HTTP/1.1\" 200 321 \"/index.php\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0) Firefox/86.0\"*\u003cbr/\u003e\u003cbr/\u003e\n\n### error.log.1\n\n[DATE TIME] [LOG LEVEL] [PID] ERROR REPORT\u003cbr/\u003e\n*[Mon Jan 01 10:20:30.456789 2000] [headers:trace2] [pid 12345] mod_headers.c(874): AH01502: headers: ap_headers_output_filter()*\u003cbr/\u003e\u003cbr/\u003e\n\n#### Note\n\nPlease notice that Craplog is taking ***.log.1** files as input. This is because these files (by default) are renewed every day at midnight, so they contain the full log stack of the (past) day.\u003cbr/\u003e\nBecause of that, when you run it, it will use yesterday's logs and store stat files cosequently.\u003cbr/\u003e\nCraplog is meant to be ran daily.\n\n\u003cbr/\u003e\u003cbr/\u003e\n\n## Cleaned access logs file\n\n\nThis is nothing special. It just creates a file in which every line from a local connection is removed (this happens with statistics too).\u003cbr/\u003e\nAfter that, the lines are re-arranged in order to be separeted by one empty line if the connection comes from the same IP address as the previous, or two empty lines if the IP is different from the above one.\u003cbr/\u003e\nThis isn't much useful if you usually check logs using *cat | grep*, but it helps if you read them directly from file.\u003cbr/\u003e\nNot a default feature.\n\n\u003cbr/\u003e\n\n## Session statistics\n\nBy default, Craplog takes as input only the ***access.log.1*** file (unless you specify to not use it, calling the `--only-errors` argument, see below).\n\nThe first time you run it, it will create a folder named *STATS*.\u003cbr/\u003e\nStatistics files will be stored inside that folder and sorted by date.\u003cbr/\u003e\u003cbr/\u003e\n\nFour **.crapstats** files will be created inside the folder named *STATS*:\u003cbr/\u003e\n- **IP**.*crapstats* = IPs statistics of the choosen file\n- **REQ**.*crapstats* = REQUESTs statistics of the choosen file\n- **RES**.*crapstats* = RESPONSEs statistics of the choosen file\n- **UA**.*crapstats* = USER AGENTs statistics of the choosen file\u003cbr/\u003e\u003cbr/\u003e\n\nYou have the opportunity to also create statistics of the errors ( `--errors` ) or even of only the errors ( `--only-errors` , avoiding the usage of the access.log.1 file).\n\nThis will create 2 additional files inside *STATS* folder:\n- **LEV**.*crapstats* = LOG LEVELs statistics of the choosen file\n- **ERR**.*crapstats* = ERROR REPORTs statistics of the choosen file\n\n\u003cbr/\u003e\n\n## Global statistics\n\n\nAdditionally, by default Craplog updates the global statistics inside the */STATS/GLOBALS* folder every time you run it (unless you specify to not do it, calling `--avoid-globals`).\n\nPlease notice that if you run it twice for the same log file, global statistics will not be reliable (obviously).\n\n\nA maximum of 6 GLOBAL files will be created inside *STATS/GLOBALS/*:\n- **GLOBAL.IP.crapstats** = GLOBAL IPs statistics\n- **GLOBAL.REQ.crapstats** = GLOBAL REQUESTs statistics\n- **GLOBAL.RES.crapstats** = GLOBAL RESPONSEs statistics\n- **GLOBAL.UA.crapstats** = GLOBAL USER AGENTs statistics\n\u003cbr/\u003e\u003cbr/\u003e[+]\u003cbr/\u003e\u003cbr/\u003e\n- **GLOBAL.LEV.crapstats** = GLOBAL LOG LEVELs statistics\n- **GLOBAL.ERR.crapstats** = GLOBAL ERROR REPORTs statistics\n\n\u003cbr/\u003e\n\n## Statistics structure\n\nStatistics' structure is the same for both SESSION and GLOBALS:\n\n{ **COUNT** } \u0026emsp; \u003e\u003e\u003e \u0026emsp; **ELEMENT**\u003cbr/\u003e\u003cbr/\u003e\n\n*example*:\n\n{ 100 } \u0026emsp; \u003e\u003e\u003e \u0026emsp; 200\u003cbr/\u003e\n{ 10 } \u0026emsp; \u003e\u003e\u003e \u0026emsp; 404\n\n\u003cbr/\u003e\u003cbr/\u003e\n\n## Usage examples\n\n\n- Craplog's complete functionalities: makes a clean access logs file, creates statisics of both access.log.1 and error.log.1 files, uses them to update globals and creates a backup of the original files\n\n  `--clean` `--errors` `--backup`\u003cbr/\u003e\u003cbr/\u003e\n\n- Takes both access logs and error logs files as input, but only updates global statistics. Also auto-deletes every conflict file it finds, moving them to trash\n\n  `--errors` `--only-globals` `--auto-delete` `--trash`\u003cbr/\u003e\u003cbr/\u003e\n\n- Also creates statisics of error logs file, but avoids updating globals\n\n  `--errors` `--avoid-globals`\n\n\u003cbr/\u003e\n\n#### Note\nPlease notice that even usign `--only-globals`, normal session's statistic files will be created. Craplog needs session files in order to update global ones.\u003cbr/\u003e\nAfter completing the job, session files will be automatically removed.\n\n\u003cbr/\u003e\n\n## Final considerations\n\n#### Estimated working speed\n\n1~10 MB/s\n\nMay be higher or lower depending on the complexity of the logs, the length of your globals and the power of your CPU.\u003cbr/\u003e\nIf Craplog takes more than 1 minute for a 10 MB file, you've probably been tested in some way (better to check).\u003cbr/\u003e\u003cbr/\u003e\n\n#### Global's backups\n\nCraplog automatically makes backups of global statistic files, in case of fire.\u003cbr/\u003e\nIf something goes wrong and you lose your actual global files, you can recover them (at least the last backup).\u003cbr/\u003e\nMove inside Craplog folder, open '**STATS**', open '**GLOBALS**', show hidden files and open '**.BACKUPS**'. Here you will find the last 7 backups taken.\u003cbr/\u003e\nFolder named '7' is always the newest and '1' the oldest.\u003cbr/\u003e\nA new backup is made every 7th time you run Craplog. If you run it once a day, it will takes backups once a week, and will keep the older one for 7 weeks.\u003cbr/\u003e\u003cbr/\u003e\n\n#### Developement and Contribution\n\nCraplog is under development.\u003cbr/\u003e\nIf you have suggestions about how to improve it please open an [issue](https://github.com/elB4RTO/craplog-GUIaidedCLI/issues).\u003cbr/\u003e\u003cbr/\u003e\n\nIf you're not running Apache, but you like this tool: same as the above (bring a sample of a log file).\u003cbr/\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felb4rto%2Fcraplog-guiaidedcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felb4rto%2Fcraplog-guiaidedcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felb4rto%2Fcraplog-guiaidedcli/lists"}