Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Linux Tipps & HardeningSecurity: Ausführen beliebiger Kommandos in evolution-ews (Fedora)(24.09.2026 um 07:47 Uhr)
Linux Tipps & HardeningSecurity: Mehrere Probleme in mingw-pcre2 (Fedora)(24.09.2026 um 07:47 Uhr)
Linux Tipps & HardeningSecurity: Denial of Service in nginx-mod-js-challenge (Fedora)(24.09.2026 um 07:47 Uhr)
Unix & Linux ServerSecurity: Mehrere Probleme in ipa (Red Hat)(24.09.2026 um 07:48 Uhr)
Sichere ProgrammierungWhy easing makes animation feel alive(24.09.2026 um 06:27 Uhr)
Sichere ProgrammierungMCP tool poisoning: Defending Against Metadata Manipulation in 2026(24.09.2026 um 06:32 Uhr)
Sicherheitslücken (CVE)What is a Software Bill of Materials (SBOM) and why your team needs one(24.09.2026 um 06:39 Uhr)
Linux Tipps & HardeningSecurity: Ausführen beliebiger Kommandos in evolution-ews (Fedora)(24.09.2026 um 07:47 Uhr)
Linux Tipps & HardeningSecurity: Mehrere Probleme in mingw-pcre2 (Fedora)(24.09.2026 um 07:47 Uhr)
Linux Tipps & HardeningSecurity: Denial of Service in nginx-mod-js-challenge (Fedora)(24.09.2026 um 07:47 Uhr)
Unix & Linux ServerSecurity: Mehrere Probleme in ipa (Red Hat)(24.09.2026 um 07:48 Uhr)
Sichere ProgrammierungWhy easing makes animation feel alive(24.09.2026 um 06:27 Uhr)
Sichere ProgrammierungMCP tool poisoning: Defending Against Metadata Manipulation in 2026(24.09.2026 um 06:32 Uhr)
Sicherheitslücken (CVE)What is a Software Bill of Materials (SBOM) and why your team needs one(24.09.2026 um 06:39 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Building a Simple ATM System in Python: A Casual Walkthrough

Hey everyone, So, I wanted to share with you all how I put together this simple ATM system in Python. It's nothing fancy, but it gets the job done! First off, I set up a couple of dictionaries to keep track of card numbers, PINs, and…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

Hey everyone,



So, I wanted to share with you all how I put together this simple ATM system in Python. It's nothing fancy, but it gets the job done!



First off, I set up a couple of dictionaries to keep track of card numbers, PINs, and account balances. It looks something like this:




import time

# Dictionary to store card numbers and corresponding PINs
cardsWithPin = {123456789: 123, 987654321: 345, 234567890: 567, 345678901: 789}

# Dictionary to store card numbers and corresponding account balances
cardsWithAmt = {123456789: 50000, 987654321: 5000, 234567890: 7890, 345678901: 100000}






Then, I created functions for different operations like checking balance, withdrawing money, and depositing money. Here's a snippet of that:




# Function to check account balance
def checkBalance(cardNo):
print(f"Current Balance: Rs.{cardsWithAmt.get(cardNo)}/-")
time.sleep(0.6)

# Function to withdraw money
def withdraw(cardNo):
# Some code here...

# Function to deposit money
def deposit(cardNo):
# Some code here...

# Main ATM system function
def atmSystem():
# Some code here...






The atmSystem function is where the magic happens. It handles the whole ATM experience, from logging in to performing transactions and quitting the system.




def atmSystem():
print("======================WELCOME==========================")
# Some code here...






And that's pretty much it! It's a straightforward program that does what it's supposed to do. Of course, there's always room for improvement, but for now, I'm happy with how it turned out.



Feel free to take a look at the full code and play around with it. If you have any suggestions for improvements or cool features to add, I'm all ears!



Catch you later!






And here's the complete code:




import time

# Dictionary to store card numbers and corresponding PINs
cardsWithPin = {123456789: 123, 987654321: 345, 234567890: 567, 345678901: 789}

# Dictionary to store card numbers and corresponding account balances
cardsWithAmt = {123456789: 50000, 987654321: 5000, 234567890: 7890, 345678901: 100000}

# Function to check account balance
def checkBalance(cardNo):
print(f"Current Balance: Rs.{cardsWithAmt.get(cardNo)}/-")
time.sleep(0.6)

# Function to withdraw money
def withdraw(cardNo):
# Some code here...

# Function to deposit money
def deposit(cardNo):
# Some code here...

# Main ATM system function
def atmSystem():
print("======================WELCOME==========================")
cardNo = int(input("Enter your card number:"))
if cardNo not in cardsWithPin:
print("Invalid card number...")
return
pin = int(input("Enter pin: "))
if cardsWithPin.get(cardNo) != pin:
print("Invalid pin...")
return
time.sleep(0.5)
print("Login Successful...")
time.sleep(0.4)

while True:
print("""Please select any option:
1). Deposit
2). Withdraw
3). Check Balance
4). Quit
""")
operation = int(input("Select option: "))
match(operation):
case 1:
print("You selected Money Deposit...")
deposit(cardNo)
case 2:
print("You selected Withdraw...")
withdraw(cardNo)
case 3:
print("You selected Check Balance...")
checkBalance(cardNo)
case 4:
time.sleep(0.3)
print("Thank you for using the ATM. Goodbye!")
return
case _:
print("Invalid option")
time.sleep(0.6)

# Run the ATM system
atmSystem()






Feel free to copy and paste it into your Python environment and give it a try! Let me know if you have any questions or suggestions.

SOC Incident Playbook: Vulnerability Remediation & Verification
title: Detect Exploitation - Building a Simple ATM System in Python: A Casual Walkthrough
id: b07ac08f-231d-47dc-8b25-c2b34e1a4bbd
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-24
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-24"
        description = "YARA Signature for "
    strings:
        $str = "Building a Simple ATM System i" ascii wide
    condition:
        any of them
}
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Kognitive Analyse für identifizierte Bedrohung: Erhöhte Bedrohungslage im Bereich Building a Simple ATM System in Python: .... Basierend auf 368k Vektor-Korrelationen werden sofortige Isolationsmaßnahmen für betroffene Endpunkte empfohlen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
🔗 Semantisch verwandte Zero-Days MariaDB 11.7 VEC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Building a Simple ATM System in Python: A Casual Walkthrough

Thematisch verwandte Begriffe: Building, Simple, System, Python · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-96676 | A vulnerability was identified in Fast FAC1900R 20190827_2.0.2. The impa…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel TTP ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick