Hacking The Fender (Please help to complete code)


import csv
import json
compromised_users =
with open(‘passwords.csv’) as password_file:
password_csv = csv.DictReader(password_file)
for password_row in password_csv:
compromised_users.append(password_row[‘Username’])

with open(“compromised_users.txt”, “w”) as compromised_user_file:
for compromised_user in compromised_users:
compromised_user_file.write(compromised_user)

with open(‘boss_message.json’,‘w’) as boss_message:
boss_message_dict = {“recipient”: “The Boss”,“message”: “Mission Success”}
json.dump(boss_message_dict,boss_message )

with open(‘new_passwords.csv’,‘w’) as new_passwords_obj:
slash_null_sig = “”" _ _ ___ __ ____
/ )( \ / ) / ( )
) / ( ( (
( O ) )(
_
/ _/ __/ (__)


/ )( \ / \ / )( / )( )( \
) __ (/ ( (
) ( ) ) ) D (
_)(
/_/_/ _
)(___)(
)(/
____ __ __ ____ _ _
___ / )( ) / \ / )/ )(
(
) _
/ (
// \
_ ) __ (
(/_/_/_/(__/_)(/


( ( / )( ( ) ( )
/ /) / (/ (// (/\
_))_/_/__/ “”"
new_passwords_obj.write(slash_null_sig)

What is wrong here? Please help

Are you getting any errors? Is your indentation correct? I just pasted your code into the exercise. It didn’t recognize any of the quote marks or indentation. Once I fixed that though, it ran fine.

I discovered my issue was not adding an s to password. I feel like an idiot now

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.