Skip to content

idea #1

Description

@cyberahm4d

its working great at the moment but i noticed the logging could be better especially if you think to make statistics for the target usage.

currently i changed the log write file to this

          ```
                log = open("log.txt", "a")
                log.write(str(target)+"\n")
                log.write(str(localtime)+"\n")
                log.write(str(count)+"\n")
                #log.write("------------------------------------------\n")
                log.close()

just to make it easier to use panda to create csv file later on.
if you like the original log file output, i would suggest to add a space in this line to make it easy for you to split the lines later on if needed (add space between Duration and : to split the line later using ":" as spliter)


                    

`log.write("Session Duration: "+str(count)+" seconds\n")`

also i tried to change the time format but it didnt work for some reason (it could be stupid reason lol),
i tried it on test file and was working great there, i have no idea where i got it wrong here, the reason i did this is to have the day, date(in this format) and the time as columns when i use panda to make the csv file.
here is what i tried:

              ```
                    log = open("log.txt", "a")
                    log.write(str(target)+"\n")
                    log.write(time.strftime("%A""\n"))
                    log.write(time.strftime("%d/%m/%Y" "\n")))
                    log.write(time.strftime("%X""\n"))
                    log.write(str(count)+"\n")
                    #log.write("------------------------------------------\n")
                    log.close()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions