Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite84bf68

Browse files
authored
Update wifi_dos_own.py
1 parentd834a42 commite84bf68

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-
defbackup_csv():
28-
"""Move all .csv files in the directory to a backup directory."""
29-
forfile_nameinos.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"infile_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
defin_sudo_mode():
4828
"""If the user doesn't run the program with super user privileges, don't allow them to continue."""
4929
ifnot'SUDO_UID'inos.environ.keys():

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp