Hi so i was making a python script that reads magnetic strips from credit cards and i needed something to allow me to cut from B to ^ so i tried split but its giving me an error. The card output is fake its only for testing. Really need help with the split thing in python really want this to work!
Credit Card output:
%B4146452892178642^SMITH/JOHN ^1505101100001100000000387000000?;E?
Erro:
Credit card detected
Traceback (most recent call last):
File "Cloner.py", line 102, in <module>
main()
File "Cloner.py", line 46, in main
clone_startUP()
File "Cloner.py", line 60, in clone_startUP
clone_type()
File "Cloner.py", line 67, in clone_type
CreditCard()
File "Cloner.py", line 80, in CreditCard
number = data.split("B", "^")
TypeError: 'str' object cannot be interpreted as an integer
Code:
import pickle
import os
import sys
import time
def main():
os.system('cls' if os.name == 'nt' else 'clear')
if not os.path.exists("Credit Cards") and not os.path.exists("Other Cards"):
os.makedirs("Credit Cards")
os.makedirs("Other Cards")
print("Creating needed files")
print("Please Whait")
print("-----5-----")
time.sleep(1)
print("-----4-----")
time.sleep(1)
print("-----3-----")
time.sleep(1)
print("-----2-----")
time.sleep(1)
print("-----1-----")
time.sleep(1)
if os.path.exists("Credit Cards") and os.path.exists("Other Cards"):
os.system('cls' if os.name == 'nt' else 'clear')
print("Files created")
clone_startUP()
else:
os.system('cls' if os.name == 'nt' else 'clear')
print("If this erro continues plz create files manually")
print("------------------------------------------------")
print("Foulder Names:")
print("1 - Creadit Cards")
print("2 - Other Cards")
sys.exit()
else:
clone_startUP()
def clone_startUP():
global data
os.system('cls' if os.name == 'nt' else 'clear')
print("Please insert a card:")
data = input()
if data == "":
clone_startUP()
else:
clone_type()
def clone_type():
if data[1:2] == "B":
os.system('cls' if os.name == 'nt' else 'clear')
print("Credit card detected")
CreditCard()
else:
OtherCard()
def CreditCard():
global number
global first_date
global second_date
global first_name
global last_name
global cvv
number = data.split("B", "^")
first_date = data.split("^",2)
second_date = data.split("^",2,5)
first_name = data.split("^","/")
last_name = data.split("/","^")
cvv = data[-14:-10]
credit_info()
def credit_info():
os.system('cls' if os.name == 'nt' else 'clear')
print(first_name)
print(last_name)
print(number)
print(first_date + "/" + second_date)
print(cvv)
main()