Git Product home page Git Product logo

telekom-negativliste-updater's Introduction

Telekom Negativliste Updater

Background

My mother has been receiving a significant number of spam calls lately, and the built-in features of the Speedport router are not effective in blocking these calls. To address this issue, I have developed a Python script, telekom_negativliste_updater.py , that scrapes a website listing the most active spam numbers in Germany for the last 24 hours. The script then updates the Telekom Negativliste, which is an online portal provided by Telekom, to block these spam numbers. Additionally, I have configured the Telefoniecenter to disallow unknown numbers from calling my mother altogether.

Status

Just a proof of concept. Currently it seems to work and to block most SPAM calls.

Prerequisites

  • Python 3.9 or higher
  • Firefox web browser
  • Geckodriver for Firefox

Installation

  1. Clone this repository:
git clone https://github.com/rsmuc/telekom-negativliste-updater
  1. Install the required Python packages:
pip install -r requirements.txt
  1. Download and install Geckodriver for Firefox. You can find the latest version here.

Installation of Geckodriver:

  1. Visit the Geckodriver releases page on GitHub: https://github.com/mozilla/geckodriver/releases

  2. Scroll down to the latest release and find the appropriate version for your operating system. Geckodriver is available for Windows, macOS, and Linux.

  3. Download the Geckodriver executable file for your operating system.

  4. Extract the contents of the downloaded archive.

  5. Add the location of the extracted Geckodriver executable to your system's PATH environment variable. This step allows you to run Geckodriver from any directory in your command prompt or terminal.

  6. Verify the installation by opening a command prompt or terminal window and running the following command:

   geckodriver --version

If the installation was successful, you should see the version number of Geckodriver printed in the console.

Please note that the exact steps for installing Geckodriver may vary depending on your operating system.

Usage

The script supports the following command-line arguments:

  • --username : Your Telekom username.
  • --password : Your Telekom password.
  • --phone_number : The phone number where the Negativliste shall be updated. As written in the dropdown when you login to the Telefoniecenter. e.g. "089 55555"
  • --number_source : The URL of the SPAM number source. e.g. notsocleverdialer
  • --simulate : Enable simulation mode to simulate adding numbers without actually modifying the Negativliste.
  • --interactive : Enable interactive mode to run firefox in foreground.

To run the script, use the following command:

python telekom_negativliste_updater.py --username your_username --password your_password --phone_number your_phone_number --number_source notsocleverdialer

The script will log in to the Telekom Telefoniecenter, navigate to the Negativliste, and update it with the current most active spam numbers from the specified source.

Please note that the specific source of the spam number list is not directly mentioned in this README, as scraping data from certain sources may not be allowed. You can configure the --number_source argument with the valid spam number source that complies with the terms of use and legal requirements. Without modification the script will only work, if you find our the correct source yourself.

Limitations

  • The Telekom Negativliste allows blocking up to 50 numbers. If the number of spam numbers exceeds this limit, only the first 50 will be blocked.
  • The script relies on the availability and accuracy of the number source website. If the website structure or content changes, the script may need to be updated accordingly.
  • Changes to the Telekom page structure or functionality may cause the script to stop working. Regular maintenance and updates may be required to keep the script functioning properly.

License

This script is licensed under the MIT License.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.