diff --git a/.github/channels.md b/.github/channels.md new file mode 100644 index 0000000..58c34b3 --- /dev/null +++ b/.github/channels.md @@ -0,0 +1,15 @@ +`master` + +The current tip-of-tree, absolute latest cutting edge build. Usually functional, though sometimes we accidentally break things. + +`dev` + +The latest fully-tested build. Usually functional, but see Bad Builds for a list of known "bad" dev builds. We continually try to roll master to dev. Doing so involves running many more tests than those that we run during master development, which is why this is not the same to master. + +`beta` + +Every month, we pick the "best" dev build of the previous month or so, and promote it to beta. These builds have been tested. + +`stable` + +When we believe we have a particularly useful build, we promote it to the stable channel. We intend to do this more or less every quarter, but this may vary. We recommend that you use this channel for all production app releases. We may ship hotfixes to the stable channel for high-priority bugs, although we intend to do this rarely. diff --git a/.github/code_of_conduct.md b/.github/code_of_conduct.md new file mode 100644 index 0000000..0d8bdad --- /dev/null +++ b/.github/code_of_conduct.md @@ -0,0 +1,90 @@ +# Citizen Code of Conduct + +## 1. Purpose + +This repository's primary goal is to be inclusive to the most significant number of contributors, with the most varied and diverse backgrounds possible. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, ability, ethnicity, socioeconomic status, and religion (or lack thereof). + +This code of conduct outlines our expectations for all those who participate in our community, as well as the consequences for unacceptable behavior. + +We invite all those who participate in this repository to help us create safe and positive experiences. + +## 2. Open [Source/Culture/Tech] Citizenship + +A supplemental goal of this Code of Conduct is to increase open [source/culture/tech] citizenship by encouraging participants to recognize and strengthen the relationships between our actions and their effects on our community. + +Communities mirror the societies in which they exist, and affirmative action is essential to counteract the many forms of inequality and abuses of power in society. + +If you see someone who is making an extra effort to ensure our community is welcoming, friendly, and encourages all participants to contribute to the fullest extent, we want to know. + +## 3. Expected Behavior + +The following behaviors are expected and requested of all community members: + + * Participate authentically and actively. In doing so, you contribute to the health and longevity of this community. + * Exercise consideration and respect in your speech and actions. + * Attempt collaboration before conflict. + * Refrain from demeaning, discriminatory, or harassing behavior and speech. + * Be mindful of your surroundings and your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential. + * Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations. + +## 4. Unacceptable Behavior + +The following behaviors are considered harassment and are unacceptable within our community: + + * Violence, threats of violence or violent language directed against another person. + * Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language. + * Posting or displaying sexually explicit or violent material. + * Posting or threatening to post other people's personally identifying information ("doxing"). + * Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability. + * Inappropriate photography or recording. + * Inappropriate physical contact. You should have someone's consent before touching them. + * Unwelcome sexual attention. This includes sexualized comments or jokes, inappropriate touching, groping, and unwelcome sexual advances. + * Deliberate intimidation, stalking or following (online or in-person). + * Advocating for, or encouraging, any of the above behavior. + * Sustained disruption of community events, including talks and presentations. + +## 5. Weapons Policy + +No weapons will be allowed at these repository events, community spaces, or in other areas covered by the scope of this Code of Conduct. Weapons include but are not limited to guns, explosives (including fireworks), and large knives such as those used for hunting or display and any other item used to cause injury or harm to others. Anyone seen in possession of one of these items will be asked to leave immediately, and will only be allowed to return without the weapon. Community members are further expected to comply with all state and local laws on this matter. + +## 6. Consequences of Unacceptable Behavior + +Unacceptable behavior from any community member, including sponsors and those with decision-making authority, will not be tolerated. + +Anyone asked to stop unacceptable behavior is expected to comply immediately. + +If a community member engages in unacceptable behavior, the community organizers may take any action they deem appropriate, including a temporary ban or permanent expulsion from the community without warning (and without a refund in the case of a paid event). + +## 7. Reporting Guidelines + +If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community organizer as soon as possible. support@complexorganizations.com. + +Additionally, community organizers are available to help community members engage with local law enforcement or to help otherwise those experiencing unacceptable behavior feel safe. In the context of in-person events, organizers will also provide escorts as desired by the person experiencing distress. + +## 8. Addressing Grievances + +If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify complexorganizations with a concise description of your grievance. Your grievance will be handled following our existing governing policies. + +## 9. Scope + +We expect all community participants (contributors, paid or otherwise; sponsors; and other guests) to abide by this Code of Conduct in all community venues--online and in-person--as well as in all one-on-one communications about community business. + +This code of conduct and its related procedures also applies to unacceptable behavior occurring outside the scope of community activities when such action can adversely affect the safety and well-being of community members. + +## 10. Contact info + +support@complexorganizations.com + +## 11. License and attribution + +The Citizen Code of Conduct is distributed by [Stumptown Syndicate](http://stumptownsyndicate.org) under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/). + +Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy). + +_Revision 2.3. Posted 6 March 2017._ + +_Revision 2.2. Posted 4 February 2016._ + +_Revision 2.1. Posted 23 June 2014._ + +_Revision 2.0, adopted by the [Stumptown Syndicate](http://stumptownsyndicate.org) board on 10 January 2013. Posted 17 March 2013._ diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..47302ff --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: gomod + directory: "/" + schedule: + interval: "daily" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/docs/_config.yml b/.github/docs/_config.yml new file mode 100644 index 0000000..b5ea2f7 --- /dev/null +++ b/.github/docs/_config.yml @@ -0,0 +1 @@ +auto: true diff --git a/.github/issue_template/bug_report.md b/.github/issue_template/bug_report.md new file mode 100644 index 0000000..80f7de4 --- /dev/null +++ b/.github/issue_template/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a bug report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/issue_template/config.yml b/.github/issue_template/config.yml new file mode 100644 index 0000000..76055b4 --- /dev/null +++ b/.github/issue_template/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: true +contact_links: + - name: GitHub Community Support + url: https://github.com/{user_name}/{repo_url}/issues + about: Please ask and answer questions here. + - name: GitHub Security Bug Bounty + url: https://github.com/{user_name}/{repo_url}/issues + about: Please report security vulnerabilities here. diff --git a/.github/issue_template/feature_request.md b/.github/issue_template/feature_request.md new file mode 100644 index 0000000..bbcbbe7 --- /dev/null +++ b/.github/issue_template/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/issue_template/pull_request_template.md b/.github/issue_template/pull_request_template.md new file mode 100644 index 0000000..7e9188e --- /dev/null +++ b/.github/issue_template/pull_request_template.md @@ -0,0 +1,20 @@ +--- +name: pull requests +about: Pull requests let you tell others about changes you've pushed to a branch in a repository +title: '' +labels: '' +assignees: '' + +--- + +**Describe the PR** A clear and concise description of what the pull request is. + +**Which issue(s) this PR fixes**: Fixes # + +**Special notes for your reviewer**: + +**Does this PR introduce a user-facing change?**: + +**Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.**: + +**Additional context** Add any other context about the pull request here. diff --git a/.github/license b/.github/license new file mode 100644 index 0000000..12bbae4 --- /dev/null +++ b/.github/license @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2021 ComplexOrganizations + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/.github/readme.md b/.github/readme.md new file mode 100644 index 0000000..74beba2 --- /dev/null +++ b/.github/readme.md @@ -0,0 +1,59 @@ +# Disposable Services Registry + +[![Updating the resources](https://github.com/complexorganizations/disposable-services-registry/actions/workflows/auto-update.yml/badge.svg)](https://github.com/complexorganizations/disposable-services-registry/actions/workflows/auto-update.yml) + +A register of transient disposable services. + +## Features + +- Lists of valid disposable domains +- Lists of valid throwaway phone numbers + +#### Get all items + +| Name | GitHub | GitLab | +| :--- | :---- | :----- | +| **Domains** | `https://raw.githubusercontent.com/complexorganizations/disposable-services-registry/main/assets/disposable-domains` | `replace-this-here` | +| **Telephone numbers** | `https://raw.githubusercontent.com/complexorganizations/disposable-services-registry/main/assets/disposable-telephone-numbers` | `and replace this here.` | + + +## FAQ + +#### How frequently are the listings updated? + +The lists are updated on a daily basis using github actions. + +#### Is it possible for me to upload a list that I discovered? + +To add a new list, please send a PR; in case you're wondering, all lists must be public in order to be scraped. + +## Roadmap + +- Make it better by adding additional listings. + + +## Feedback + +Please utilize the github repo conversations to offer feedback. + + +## Support + +Please utilize the github repo issue and wiki for help. + + +## Authors + +Open Source Community + + +## License + +[Apache License Version 2.0](https://raw.githubusercontent.com/complexorganizations/disposable-services-registry/main/.github/license) + +## Used By + +This project is used by the following companies: + +- +- diff --git a/.github/security.md b/.github/security.md new file mode 100644 index 0000000..47149df --- /dev/null +++ b/.github/security.md @@ -0,0 +1,9 @@ +# Security Policy + +### Reporting a Vulnerability + +It is difficult to underestimate the essential importance of Responsible Disclosure when it comes to private communications within the public network area. The lives of some people rely on keeping their experiences secret. On a larger scale than the individual level, entire countries will depend on the protection and dignity of people who manage these projects. Please be prompt in documentation and vulnerability disclosures. + +We'll seek to reach a 90-day turnaround on vulnerabilities that have been reported responsibly. When we haven't updated the repository in 90 days from the audit, disclosing the vulnerability on the GitHub Issues is necessary so others know they can no longer trust this repository to effectively protect their security. + +By default rationale on how software releases should be delivered, we aim for the highest possible level on protection without compromising on the works. Unless the guard may be removed between now and the time you passed away, we believe that this is not enough for our designs. diff --git a/.github/status.md b/.github/status.md new file mode 100644 index 0000000..637dd76 --- /dev/null +++ b/.github/status.md @@ -0,0 +1,11 @@ +`complete` :heavy_check_mark: + +Most of the project is completed, some bug fixing or security fixing may take place. + +`active` :heart: + +The venture is under active growth. + +`abandoned` :x: + +There could be an unfinished project, Identified as a project that for the purposes of this analysis has been entirely abandoned, or indefinitely postponed. At any point of a project lifecycle, abandonment can occur and cause severe losses. diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml new file mode 100644 index 0000000..e5167ef --- /dev/null +++ b/.github/workflows/analysis.yml @@ -0,0 +1,20 @@ +name: Go +on: [push, pull_request] +jobs: + build: + name: Build + runs-on: windows-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + - name: Set up Go version + uses: actions/setup-go@v4 + with: + go-version-file: "go.mod" + cache: true + check-latest: true + id: go + - name: Get dependencies + run: go get . + - name: Build Test + run: go build . diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml new file mode 100644 index 0000000..4debbe2 --- /dev/null +++ b/.github/workflows/auto-update.yml @@ -0,0 +1,38 @@ +name: Updating the resources +on: + schedule: + - cron: "0 0 * * *" + push: + paths: + - "assets/**" + workflow_dispatch: +jobs: + build: + name: Build + runs-on: windows-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + - name: Set up Go version + uses: actions/setup-go@v4 + with: + go-version-file: "go.mod" + cache: true + check-latest: true + id: go + - name: Get dependencies + run: go get . + - name: Build Test + run: go build . + - name: Generating new resources. + run: .\disposable-services-registry.exe -update + - name: Update resources + run: | + git config user.name github-actions + git config user.email github-actions@github.com + git checkout --orphan tmp-main + git add -A + git commit -m "Updates are performed automatically. $(date)" + git branch -D main + git branch -m main + git push -f origin main diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..f363895 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,17 @@ +name: "CodeQL" +on: [push, pull_request] +jobs: + analyse: + name: Analyse + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: go + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/delete-old-github-actions.yml b/.github/workflows/delete-old-github-actions.yml new file mode 100644 index 0000000..f12045e --- /dev/null +++ b/.github/workflows/delete-old-github-actions.yml @@ -0,0 +1,16 @@ +name: Delete old github workflows +on: + schedule: + - cron: "0 0 1 * *" + workflow_dispatch: +jobs: + del_runs: + runs-on: ubuntu-latest + steps: + - name: Delete workflow runs + uses: Mattraks/delete-workflow-runs@v2 + with: + token: ${{ github.token }} + repository: ${{ github.repository }} + retain_days: 30 + keep_minimum_runs: 7 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3d7580b --- /dev/null +++ b/.gitignore @@ -0,0 +1,18 @@ +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +vendor/ + +# The application's binary. +disposable-services-registry diff --git a/assets/disposable-domains b/assets/disposable-domains new file mode 100644 index 0000000..285a5db --- /dev/null +++ b/assets/disposable-domains @@ -0,0 +1,10 @@ +grr.la +guerrillamail.biz +guerrillamail.com +guerrillamail.de +labworld.org +sharklasers.com +spam4.me +vintomaper.com +zoeyy.com +pokemail.net diff --git a/assets/exclusions-domains b/assets/exclusions-domains new file mode 100644 index 0000000..e5b3617 --- /dev/null +++ b/assets/exclusions-domains @@ -0,0 +1,10 @@ +aol.com +gmail.com +hotmail.com +live.com +mail.com +msn.com +outlook.com +protonmail.com +yahoo.com +yandex.com diff --git a/assets/exclusions-telephone-numbers b/assets/exclusions-telephone-numbers new file mode 100644 index 0000000..2335b90 --- /dev/null +++ b/assets/exclusions-telephone-numbers @@ -0,0 +1,4 @@ +911 +311 +211 +112 diff --git a/assets/readme.md b/assets/readme.md new file mode 100644 index 0000000..2882c80 --- /dev/null +++ b/assets/readme.md @@ -0,0 +1,51 @@ +# Disposable Services Registry Assets + +This directory contains assets for the `disposable-services-registry` project. These assets can include images, icons, diagrams, and other static resources that support the main application or documentation. + +## Table of Contents + +- [Overview](#overview) +- [Directory Structure](#directory-structure) +- [Usage](#usage) +- [Contributing](#contributing) +- [License](#license) + +## Overview + +Assets play a crucial role in enhancing the visual appeal, branding, and user experience of a project. For the `disposable-services-registry`, these assets might be used in the user interface, documentation, or promotional materials. + +## Directory Structure + +- **Images/**: Contains various images, such as screenshots, used in documentation or the application's UI. +- **Icons/**: Houses icon files representing the application or specific features. +- **Diagrams/**: Diagrams or flowcharts explaining the architecture or flow of the service. +- **Branding/**: Any branding materials, including logos or banners. + +(Note: The above structure is hypothetical and should be adjusted based on the actual contents of the `assets/` directory.) + +## Usage + +To use the assets: + +1. Navigate to the desired sub-directory. +2. Identify the asset you wish to use. +3. Integrate or reference it in your application, documentation, or promotional materials as needed. + +## Contributing + +If you'd like to contribute new assets or make changes to existing ones: + +1. Fork the `disposable-services-registry` repository. +2. Create a new branch for your changes. +3. Add or modify assets in the `assets/` directory, ensuring they adhere to any design guidelines or standards the project may have. +4. Push your changes and create a pull request. + +Please ensure that you have the rights to any assets you add and that they comply with the project's licensing and design guidelines. + +## License + +Unless otherwise specified, the assets in this directory are licensed under the same license as the `disposable-services-registry` project. See the [LICENSE](../LICENSE) file in the root directory for more information. + +--- + +This is a basic template and can be expanded upon based on the specific needs and details of the `disposable-services-registry` project. Adjustments might be needed based on the actual assets present in the directory and their specific configurations. diff --git a/assets/validate-disposable-domains b/assets/validate-disposable-domains new file mode 100644 index 0000000..c3546b3 --- /dev/null +++ b/assets/validate-disposable-domains @@ -0,0 +1,15 @@ +zoeyy.com +sharklasers.com +guerrillamail.info +grr.la +guerrillamail.biz +guerrillamail.com +guerrillamail.de +guerrillamail.net +guerrillamail.org +guerrillamailblock.com +pokemail.net +spam4.me +labworld.org +mentonit.net +vintomaper.com diff --git a/assets/validate-telephone-numbers b/assets/validate-telephone-numbers new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/assets/validate-telephone-numbers @@ -0,0 +1 @@ + diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..84f47cf --- /dev/null +++ b/go.mod @@ -0,0 +1,13 @@ +module github.com/complexorganizations/disposable-services-registry + +go 1.19 + +require ( + github.com/nyaruka/phonenumbers v1.2.1 + golang.org/x/net v0.17.0 +) + +require ( + golang.org/x/text v0.13.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..bf3a232 --- /dev/null +++ b/go.sum @@ -0,0 +1,18 @@ +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/nyaruka/phonenumbers v1.2.1 h1:88YAhE7g5qrjR2nhUOU/KkrfpbV2HKkjFRLjzVwCGyA= +github.com/nyaruka/phonenumbers v1.2.1/go.mod h1:wzk2qq7qwsaBKrfbkWKdgHYOOH+QFTesSpIq53ELw8M= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= diff --git a/main.go b/main.go new file mode 100644 index 0000000..cb6bcaa --- /dev/null +++ b/main.go @@ -0,0 +1,415 @@ +package main + +import ( + "bufio" + "bytes" + "flag" + "io" + "log" + "net" + "net/http" + "net/url" + "os" + "regexp" + "runtime/debug" + "sort" + "strings" + "sync" + + "github.com/nyaruka/phonenumbers" + "golang.org/x/net/publicsuffix" +) + +var ( + // Location of the configuration in the local system path + disposableDomains = "assets/disposable-domains" + exclusionsDomains = "assets/exclusions-domains" + disposableTelephoneNumbers = "assets/disposable-telephone-numbers" + exclusionsTelephoneNumbers = "assets/exclusions-telephone-numbers" + // Memorandum with a domain list. + exclusionsDomainsArray []string + exclusionsTelephoneNumbersArray []string + // Go routines using waitgrops. + scrapeWaitGroup sync.WaitGroup + validationWaitGroup sync.WaitGroup + uniqueWaitGroup sync.WaitGroup + // The user expresses his or her opinion on what should be done. + update bool + // err stands for error. + err error +) + +func init() { + // If any user input flags are provided, use them. + if len(os.Args) > 1 { + tempUpdate := flag.Bool("update", false, "Make any necessary changes to the listings.") + flag.Parse() + update = *tempUpdate + } else { + log.Fatal("Error: No flags provided. Please use -help for more information.") + } +} + +func main() { + // Lists should be updated. + if update { + // Clear your memories as much as possible + os.RemoveAll(os.TempDir()) + os.Mkdir(os.TempDir(), 0777) + debug.FreeOSMemory() + // Max ammount of go routines + debug.SetMaxThreads(100000) + // Remove the old files from your system if they are found. + err = os.Remove(disposableDomains) + if err != nil { + log.Println(err) + } + err = os.Remove(disposableTelephoneNumbers) + if err != nil { + log.Println(err) + } + // Scrape all of the domains and save them afterwards. + startScraping() + // Read through all of the exclusion domains before appending them. + if fileExists(exclusionsDomains) { + exclusionsDomainsArray = readAndAppend(exclusionsDomains, exclusionsDomainsArray) + } + if fileExists(exclusionsTelephoneNumbers) { + exclusionsTelephoneNumbersArray = readAndAppend(exclusionsTelephoneNumbers, exclusionsTelephoneNumbersArray) + } + // We'll make everything distinctive once everything is finished. + uniqueWaitGroup.Add(2) + go makeEverythingUnique(disposableDomains) + go makeEverythingUnique(disposableTelephoneNumbers) + uniqueWaitGroup.Wait() + } +} + +// Replace the URLs in this section to create your own list or add new lists. +func startScraping() { + // Disposable Domains + domainsLists := []string{ + "https://raw.githubusercontent.com/complexorganizations/disposable-services-registry/main/assets/validate-disposable-domains", + } + // Phone Numbers + phoneNumberList := []string{ + "https://raw.githubusercontent.com/complexorganizations/disposable-services-registry/main/assets/validate-telephone-numbers", + } + // Let's start by making everything one-of-a-kind so we don't scrape the same thing twice. + uniqueDomainsLists := makeUnique(domainsLists) + domainsLists = nil + uniquePhoneNumberList := makeUnique(phoneNumberList) + domainsLists = nil + // Disposable Domains + for _, content := range uniqueDomainsLists { + if validURL(content) { + scrapeWaitGroup.Add(1) + go scrapeDomainContent(content, disposableDomains) + } + } + // Phone Numbers + for _, content := range uniquePhoneNumberList { + if validURL(content) { + scrapeWaitGroup.Add(1) + go scrapePhoneNumberContent(content, disposableTelephoneNumbers) + } + } + // Clear the memory via force. + debug.FreeOSMemory() + // We'll just wait for it to finish as a group. + scrapeWaitGroup.Wait() +} + +// Phone numbers +func scrapePhoneNumberContent(url string, saveLocation string) { + // Send a request to acquire all the information you need. + response, err := http.Get(url) + if err != nil { + log.Println(err) + } + // read all the content of the body. + body, err := io.ReadAll(response.Body) + if err != nil { + log.Println(err) + } + // Examine the page's response code. + if response.StatusCode != 200 { + log.Println("Sorry, but we were unable to scrape the page you requested due to a error.", url) + } + // Scraped data is read and appended to an array. + var returnContent []string + scanner := bufio.NewScanner(bytes.NewReader(body)) + scanner.Split(bufio.ScanLines) + for scanner.Scan() { + returnContent = append(returnContent, scanner.Text()) + } + // When you're finished, close the body. + response.Body.Close() + for _, content := range returnContent { + // Make sure the domain is at least 3 characters long + if len(content) > 1 { + // This is a list of all the phone numbers discovered using the regex. + phoneNumbers := regexp.MustCompile(`(\+?( |-|\.)?\d{1,2}( |-|\.)?)?(\(?\d{0}\)?|\d{3})( |-|\.)?(\d{1}( |-|\.)?\d{8})`).Find([]byte(content)) + // all the emails from rejex + phoneNumber := string(phoneNumbers) + if len(phoneNumber) > 3 { + // Validate the entire list of domains. + if len(phoneNumber) < 50 && notValidateCharacters(phoneNumber) && !strings.Contains(phoneNumber, " ") && !strings.Contains(phoneNumber, ".") && !strings.Contains(phoneNumber, "#") && !strings.Contains(phoneNumber, "*") && !strings.Contains(phoneNumber, "!") { + // validate the phone number and than save the phone number. + validationWaitGroup.Add(1) + go validateThePhoneNumbers(phoneNumber, disposableTelephoneNumbers) + } + } + } + } + debug.FreeOSMemory() + scrapeWaitGroup.Done() + // While the validation is being performed, we wait. + validationWaitGroup.Wait() +} + +// domains stuff +func scrapeDomainContent(url string, saveLocation string) { + // Send a request to acquire all the information you need. + response, err := http.Get(url) + if err != nil { + log.Println(err) + } + // read all the content of the body. + body, err := io.ReadAll(response.Body) + if err != nil { + log.Println(err) + } + // Examine the page's response code. + if response.StatusCode != 200 { + log.Println("Sorry, but we were unable to scrape the page you requested due to a error.", url) + } + // Scraped data is read and appended to an array. + var returnContent []string + scanner := bufio.NewScanner(bytes.NewReader(body)) + scanner.Split(bufio.ScanLines) + for scanner.Scan() { + returnContent = append(returnContent, scanner.Text()) + } + // When you're finished, close the body. + err = response.Body.Close() + if err != nil { + log.Println(err) + } + for _, content := range returnContent { + // Make sure the domain is at least 3 characters long + if len(content) > 1 { + // This is a list of all the domains discovered using the regex. + foundDomains := regexp.MustCompile(`(?:[a-z0-9_](?:[a-z0-9_-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]`).Find([]byte(content)) + // all the emails from rejex + foundDomain := string(foundDomains) + if len(foundDomain) > 3 { + // Validate the entire list of domains. + if len(foundDomain) < 255 && checkIPAddress(foundDomain) && !strings.Contains(foundDomain, " ") && strings.Contains(foundDomain, ".") && !strings.Contains(foundDomain, "#") && !strings.Contains(foundDomain, "*") && !strings.Contains(foundDomain, "!") { + // icann.org confirms it's a public suffix domain + eTLD, icann := publicsuffix.PublicSuffix(foundDomain) + // Start the other tests if the domain has a valid suffix. + if icann || strings.IndexByte(eTLD, '.') >= 0 { + validationWaitGroup.Add(1) + // Go ahead and verify it in the background. + go validateTheDomains(foundDomain, saveLocation) + } + } + } + } + } + debug.FreeOSMemory() + scrapeWaitGroup.Done() + // While the validation is being performed, we wait. + validationWaitGroup.Wait() +} + +func validateTheDomains(uniqueDomain string, locatioToSave string) { + // Validate each and every found domain. + if isDomainRegistered(uniqueDomain) { + // Maintain a list of all authorized domains. + writeToFile(locatioToSave, uniqueDomain) + } + // When it's finished, we'll be able to inform waitgroup that it's finished. + validationWaitGroup.Done() +} + +func validateThePhoneNumbers(phoneNumber string, locatioToSave string) { + num, err := phonenumbers.Parse(phoneNumber, "US") + if err != nil { + log.Println(err) + } + if phonenumbers.IsValidNumber(num) { + writeToFile(locatioToSave, phoneNumber) + } + validationWaitGroup.Done() +} + +// Take a list of domains and make them one-of-a-kind +func makeUnique(randomStrings []string) []string { + var uniqueString []string + for _, value := range randomStrings { + if !arrayContains(uniqueString, value) { + uniqueString = append(uniqueString, value) + } + } + return uniqueString +} + +// check if a array contains a string +func arrayContains(originalArray []string, conatinsString string) bool { + for _, arrayValue := range originalArray { + if arrayValue == conatinsString { + return true + } + } + return false +} + +// Check if a domain has been registed and return a bool. +func isDomainRegistered(domain string) bool { + _, err := net.LookupNS(domain) + if err == nil { + return true + } + _, err = net.LookupCNAME(domain) + if err == nil { + return true + } + _, err = net.LookupAddr(domain) + if err == nil { + return true + } + _, err = net.LookupHost(domain) + if err == nil { + return true + } + _, err = net.LookupMX(domain) + if err == nil { + return true + } + _, err = net.LookupTXT(domain) + if err == nil { + return true + } + _, err = net.LookupIP(domain) + if err == nil { + return true + } + return false +} + +// Make sure it's not an IP address. +func checkIPAddress(ip string) bool { + return net.ParseIP(ip) == nil +} + +// Verify the URI. +func validURL(uri string) bool { + _, err = url.ParseRequestURI(uri) + return err == nil +} + +// Check to see if a file already exists. +func fileExists(filename string) bool { + info, err := os.Stat(filename) + if os.IsNotExist(err) { + return false + } + return !info.IsDir() +} + +// Remove a string from a slice +func removeStringFromSlice(originalSlice []string, removeString string) []string { + // go though the array + for i, content := range originalSlice { + // if the array matches with the string, you remove it from the array + if content == removeString { + return append(originalSlice[:i], originalSlice[i+1:]...) + } + } + return originalSlice +} + +// Save the information to a file. +func writeToFile(pathInSystem string, content string) { + // open the file and if its not there create one. + filePath, err := os.OpenFile(pathInSystem, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) + if err != nil { + log.Println(err) + } + // write the content to the file + _, err = filePath.WriteString(content + "\n") + if err != nil { + log.Println(err) + } + // close the file + defer filePath.Close() +} + +// Read and append to array +func readAndAppend(fileLocation string, arrayName []string) []string { + file, err := os.Open(fileLocation) + if err != nil { + log.Println(err) + } + // scan the file, and read the file + scanner := bufio.NewScanner(file) + // split each line + scanner.Split(bufio.ScanLines) + // append each line to array + for scanner.Scan() { + arrayName = append(arrayName, scanner.Text()) + } + // close the file before func ends + defer file.Close() + return arrayName +} + +// Make sure the value doesn't contain any characters that aren't allowed. +func notValidateCharacters(value string) bool { + completeRange := []string{"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"} + for _, content := range completeRange { + if strings.Contains(value, content) { + return false + } + } + return true +} + +// Read the completed file, then delete any duplicates before saving it. +func makeEverythingUnique(contentLocation string) { + var finalContentList []string + finalContentList = readAndAppend(contentLocation, finalContentList) + // Make each domain one-of-a-kind. + uniqueContent := makeUnique(finalContentList) + // It is recommended that the array be deleted from memory. + finalContentList = nil + // Sort the entire string. + sort.Strings(uniqueContent) + // Remove all the exclusions domains from the list. + if contentLocation == disposableDomains { + for _, content := range exclusionsDomainsArray { + uniqueContent = removeStringFromSlice(uniqueContent, content) + } + } + // Remove all the exclusions phone numbers from the list. + if contentLocation == disposableTelephoneNumbers { + for _, content := range exclusionsTelephoneNumbersArray { + uniqueContent = removeStringFromSlice(uniqueContent, content) + } + } + // Delete the original file and rewrite it. + err = os.Remove(contentLocation) + if err != nil { + log.Println(err) + } + // Begin composing the document + for _, content := range uniqueContent { + writeToFile(contentLocation, content) + } + // remove it from memory + uniqueContent = nil + debug.FreeOSMemory() + uniqueWaitGroup.Done() +}