Skip to content

Commit e84bf68

Browse files
authored
Update wifi_dos_own.py
1 parent d834a42 commit e84bf68

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

wifi_dos_own.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,6 @@
2424

2525

2626
# Helper functions
27-
def backup_csv():
28-
"""Move all .csv files in the directory to a backup directory."""
29-
for file_name in os.listdir():
30-
# We should only have one csv file, we back them up in a backup directory every time we run the program.
31-
if ".csv" in file_name:
32-
print("There shouldn't be any .csv files in your directory. We found .csv files in your directory.")
33-
# We get the current working directory.
34-
directory = os.getcwd()
35-
try:
36-
# We make a new directory called /backup
37-
os.mkdir(directory + "/backup/")
38-
except:
39-
print("Backup directory exists.")
40-
# Create a timestamp
41-
timestamp = datetime.now()
42-
# We copy any .csv files in the folder to the backup folder.
43-
shutil.move(file_name, directory + "/backup/" + str(timestamp) + "-" + file_name)
44-
print(f"Moved files to {directory}/backup directory.")
45-
46-
4727
def in_sudo_mode():
4828
"""If the user doesn't run the program with super user privileges, don't allow them to continue."""
4929
if not 'SUDO_UID' in os.environ.keys():

0 commit comments

Comments
 (0)