{"id":13841908,"url":"https://github.com/alanEG/Gosna","last_synced_at":"2025-07-11T13:33:09.085Z","repository":{"id":40005714,"uuid":"489954513","full_name":"alanEG/Gosna","owner":"alanEG","description":"Dynamic url monitor","archived":false,"fork":false,"pushed_at":"2022-08-28T11:45:03.000Z","size":16357,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-05T17:29:43.319Z","etag":null,"topics":["bugbounty","change-detection","url","url-change","url-change-notification","url-monitor"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alanEG.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}},"created_at":"2022-05-08T13:41:06.000Z","updated_at":"2023-03-10T19:09:42.000Z","dependencies_parsed_at":"2022-07-27T04:02:05.718Z","dependency_job_id":null,"html_url":"https://github.com/alanEG/Gosna","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanEG%2FGosna","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanEG%2FGosna/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanEG%2FGosna/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanEG%2FGosna/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alanEG","download_url":"https://codeload.github.com/alanEG/Gosna/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225729747,"owners_count":17515159,"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","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":["bugbounty","change-detection","url","url-change","url-change-notification","url-monitor"],"created_at":"2024-08-04T17:01:23.916Z","updated_at":"2024-11-21T12:30:37.340Z","avatar_url":"https://github.com/alanEG.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Gosna\n\nA Mointor url for change \n\n- [Requirements](https://github.com/alanEG/Gosna#Requirements)\n- [Installation](https://github.com/alanEG/Gosna#installation)\n- [Configuration file](https://github.com/alanEG/Gosna#configuration-file)\n- [Example usage](https://github.com/alanEG/Gosna#example-usage)\n    - [Normal_Usage](https://github.com/alanEG/Gosna#normal-Usage)\n    - [Dynamic_Usage](https://github.com/alanEG/Gosna#dynamic-Usage)\n\n## Requirements \n   \n   - [diff2html-cli](https://github.com/rtfpessoa/diff2html-cli)\n   - [js-beautify](https://www.npmjs.com/package/js-beautify)\n    \n## Installation\n\n- Run the following command to install the tool `go install github.com/alanEG/Gosna` (the same command works for updating)\n  _or_\n- `git clone https://github.com/alaneg/gosna ; cd gosna ; go build`\n\nGosna depends on go1.18 or greater.\n\n## Configuration file\n\nGosna won't work if you don't initialize the config file.  \n\nGosna will search for the config file in three different ways.\n\n1 - `gosna_config` env\n\n2 - `~/.gosna_config.json`\n\n3 - `-config` option\n\nHere is an example of the configurations \n\n```json\n{\n  \"Config\": {\n    \"Is_first\": false,\n    \"Directory_work\": \"/home/user/work/\",\n    \"Directory_result\": \"/home/user/result/\",\n    \"Channel_use\": \"None\",\n    \"Channel\": {\n      \"Slack\": null,\n      \"Mail\": {\n        \"Tls\": true,\n        \"From\": null,\n        \"To\": null,\n        \"Host\": null,\n        \"Port\": null,\n        \"Email\": null,\n        \"Password\": null\n      }\n    }\n  },\n  \"Target\": []\n}\n```\n\n`Is_first`: It helps Gosna with important setup tasks during its initial setup. If not, set it to true.\n\n`Directory_work`: Specify the folder where the tool will save the content from the URLs.\n\n`Directory_result`: Specify the directory where the tool will save the results.\n\n`Channel_use`: Specify the channel the tool will use if it detects a change, or set it to None if you want to print the result to the stdout. Available options are `[slack, mail]`.\n\n- `channel`\n\n  - `Slack`: Slack webhook\n  \n  - `Mail`: Mail config\n\n## Example usage\n\nThe usage examples below show just the simplest tasks you can accomplish using `gosna -h`. \n\n```\n    ______      _____   ______  __   __    _____    \n   /_/\\___\\    ) ___ ( / ____/\\/_/\\ /\\_\\  /\\___/\\   \n   ) ) ___/   / /\\_/\\ \\) ) __\\/) ) \\ ( ( / / _ \\ \\  \n  /_/ /  ___ / /_/ (_\\ \\\\ \\ \\ /_/   \\ \\_\\\\ \\(_)/ /  \n  \\ \\ \\_/\\__\\\\ \\ )_/ / /_\\ \\ \\\\ \\ \\   / // / _ \\ \\  \n   )_)  \\/ _/ \\ \\/_\\/ /)____) ))_) \\ (_(( (_( )_) ) \n   \\_\\____/    )_____( \\____\\/ \\_\\/ \\/_/ \\/_/ \\_\\/  \n                  v1.0 @alanEG\n\nUsage: ./gosna [options]\n   -run          Run type [add,check]\n   -timeout      Requests timeout (default 5)\n   -thread       Requests thread\n   -header  -H   Requests header\n   -repeat  -r   Repeat Check  [m,h,d]\n   -dynamic      Check dynamic (default false)\n   -config       Config file   (default ~/.gosna_config.json)\n   -no-color     Disable color\n```\n\n### Normal Usage\n\nThere are two run type \n- add\n- check \n\n##### Example: `add` \n\nAdd the url to check it later \n\n`cat url.txt | gosna -run add`\n\nGosnal will retrieve the HTML content, save it in the work directory, and then store the URL along with its hash and options in the config file under the target JSON object.\n\n##### Example: `check`\n\nCheck the url if there change \n\n`gosna -run check`\n\nGosna will retrieve the URLs from the config file, then fetch the new content, save it in the work directory, and compare the new content with the existing content.\n\nReapet check for diffrent time by flag `-repeat` or `-r`\nIn this options you have 3 subs options [m,h,d] minute,hour,day\nYou can use one of this options in flag `-repeat` or `-r` by \n\n`gosna -run check -repeat 1m`\n### Dynamic Usage\n\nHere's how the dynamic check operates when adding a new URL:\n\n1 - Send five requests and save the responses in the tmp directory.\n\n2 - Extract the dynamic lines from the response, then remove the dynamic lines from a selected file.\n\n3 - Save response of the selected one to the work directory  \n\nHere's how the dynamic check functions when the tool checks for any changes:\n\n1 - Fetch the latest response.\n\n2 - Remove the dynamic lines from the response.\n\n3 - Compare the new response with the old response to check for changes.\n\n\n##### Example\n`cat urls.txt | gosna -run add -dynamic`\n\n##### Note\nSometimes, the dynamic option may not work effectively.\n\nFor instance, consider that we need to monitor `https://www.youtube.com/`. Since it prints different line numbers with each request, the tool will display this URL in each check.\n\n## License\n\nGosna is released under MIT license. See [LICENSE](https://github.com/alanEG/Gosna/blob/main/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FalanEG%2FGosna","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FalanEG%2FGosna","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FalanEG%2FGosna/lists"}