{"id":296,"date":"2024-09-19T02:26:55","date_gmt":"2024-09-19T02:26:55","guid":{"rendered":"https:\/\/cybersecurityinfocus.com\/?p=296"},"modified":"2024-09-19T02:26:55","modified_gmt":"2024-09-19T02:26:55","slug":"automate-everything-with-python-and-bash","status":"publish","type":"post","link":"https:\/\/cybersecurityinfocus.com\/?p=296","title":{"rendered":"Automate Everything With Python and Bash"},"content":{"rendered":"<p>Hey there! You ever think about how amazing it would be to just automate your life a lot more every time by setting up systems, and all this stuff? Be it file management, task scheduling, or dealing with intricate processes \u2014 automation is the answer. For automation, use Python and Bash.<\/p>\n<p>This article covers just how much Python and Bash can do to automate anything. But not the theory \u2014 we are going to be doing examples. And, you will get the knowledge of how to write scripts that can do boring tasks for you while saving yourself some time, but also automate all the repetitive things or system operations.<\/p>\n<p>We\u2019ll start with the basics: setting up your environment and writing simple scripts in Python and Bash. Next we will cover some more advanced using these two combinators so we can push our automation further. At the same time you will get a sneak peak to some of real world applications and how learning these skills can be a game-changer for you.<\/p>\n<p>Oh, and one you are hungry for more \u2014 well, don\u2019t forget our ebook <strong><em><a href=\"https:\/\/codelivly.gumroad.com\/l\/the-art-of-offensive-scripting\">The Art of Offensive Scripting<\/a><\/em><\/strong>. We need some real-life examples and in-depth tricks to go to the next level of automation from here onwards.<\/p>\n<p>So, roll up your sleeves, and let\u2019s get started on automating everything with Python and Bash! <\/p>\n<h2 class=\"wp-block-heading\"><strong>Getting Started with Automation<\/strong><\/h2>\n<p>Well then, let us delve into a bit of realistic automation. We will go back from the beginning (always good for understanding) and increase the difficulty each time. They will be using <a href=\"https:\/\/www.codelivly.com\/learning-linux-start-here\/\">Linux <\/a>and Gedit as their main tools, so enough words let\u2019s get to it!<\/p>\n<h3 class=\"wp-block-heading\"><strong>What is Automation?<\/strong><\/h3>\n<p>Automation is the practice of writing scripts or using tools to take over redundant tasks for you. Sounds nice, imagine a virtual assistant doing the boring work for you.<\/p>\n<h3 class=\"wp-block-heading\"><strong>Why Automate with Python and Bash?<\/strong><\/h3>\n<p>Python or Bash are the two most powerful tools for automating your work. Python I s great for more complex tasks and data manipulation, yet Bash is amazing when you want a few lines to an operation on the system. The solution is powerful in combination: it can meet a spectrum of automation requirements.<\/p>\n<h3 class=\"wp-block-heading\"><strong>Setting Up Your Environment<\/strong><\/h3>\n<p>First things first, let\u2019s set up your environment:<\/p>\n<p><strong>Install Python<\/strong>: Most Linux distributions come with Python pre-installed. If you need to install or update it, use the command sudo apt install python3.<\/p>\n<p><strong>Set Up Bash<\/strong>: Bash is included with most Linux systems, so you\u2019re all set!<\/p>\n<p><strong>Use Gedit<\/strong>: Gedit is a simple text editor perfect for writing scripts. Open it by typing gedit in your terminal.<\/p>\n<h3 class=\"wp-block-heading\"><strong>Writing Your First Python Script<\/strong><\/h3>\n<p>Let\u2019s start with something simple\u2014a \u201cHello, World!\u201d script in Python. Open Gedit and create a file named hello_world.py:<\/p>\n<p>print(&#8220;Hello, World!&#8221;)<\/p>\n<p>Save the file and run it from your terminal using:<\/p>\n<p>python3 hello_world.py<\/p>\n<p>You should see the message \u201cHello, World!\u201d printed to your terminal. Congratulations, you\u2019ve just written and run your first Python script!<\/p>\n<h3 class=\"wp-block-heading\"><strong>Writing Your First Bash Script<\/strong><\/h3>\n<p>Now, let\u2019s create a basic Bash script. Open Gedit and create a file named hello_world.sh:<\/p>\n<p>#!\/bin\/bash<\/p>\n<p>echo &#8220;Hello, World!&#8221;<\/p>\n<p>Save the file, make it executable with chmod +x hello_world.sh, and run it with:<\/p>\n<p>.\/hello_world.sh<\/p>\n<p>You should see \u201cHello, World!\u201d printed to your terminal. Awesome job!<\/p>\n<h3 class=\"wp-block-heading\"><strong>Automating Tasks with Python<\/strong><\/h3>\n<p>Now that you\u2019ve got the basics down, let\u2019s move on to more practical automation. Here\u2019s a script that renames files in a directory. Open Gedit and create a file named rename_files.py:<\/p>\n<p>import os<\/p>\n<p># Path to the directory containing files<br \/>\npath = &#8216;\/path\/to\/your\/directory&#8217;<\/p>\n<p># Loop through all files in the directory<br \/>\nfor filename in os.listdir(path):<br \/>\n    new_name = &#8216;prefix_&#8217; + filename<br \/>\n    os.rename(os.path.join(path, filename), os.path.join(path, new_name))<\/p>\n<p>print(&#8220;Files renamed successfully!&#8221;)<\/p>\n<p>Replace &#8216;\/path\/to\/your\/directory&#8217; with the actual path to your folder. Save the file and run it from your terminal using:<\/p>\n<p>python3 rename_files.py<\/p>\n<p>Your files should now have a new prefix.<\/p>\n<h3 class=\"wp-block-heading\"><strong>Automating Tasks with Bash<\/strong><\/h3>\n<p>Let\u2019s automate cleaning up old log files with Bash. Create a file named cleanup_logs.sh in Gedit:<\/p>\n<p>#!\/bin\/bash<\/p>\n<p># Path to the directory containing logs<br \/>\nLOG_DIR=&#8221;\/path\/to\/your\/logs&#8221;<\/p>\n<p># Find and delete log files older than 7 days<br \/>\nfind $LOG_DIR -type f -name &#8220;*.log&#8221; -mtime +7 -exec rm {} ;<\/p>\n<p>echo &#8220;Old log files cleaned up!&#8221;<\/p>\n<p>Replace &#8220;\/path\/to\/your\/logs&#8221; with your log directory path. Save the file, make it executable with chmod +x cleanup_logs.sh, and run it with:<\/p>\n<p>.\/cleanup_logs.sh<\/p>\n<p>Your old log files will be cleaned up!<\/p>\n<h3 class=\"wp-block-heading\"><strong>Running Scripts Automatically<\/strong><\/h3>\n<p>To automate running your scripts:<\/p>\n<p><strong>For Bash Scripts<\/strong>: Use cron jobs. Open your crontab  crontab -e and add a line like 0 2 * * * \/path\/to\/cleanup_logs.sh to run your script daily at 2 AM.<\/p>\n<p><strong>For Python Scripts<\/strong>: You can use cron jobs similarly or set up schedules as needed.<\/p>\n<p>And there you have it\u2014getting started with automation using <a href=\"https:\/\/www.codelivly.com\/python-the-ultimate-weapon-in-the-hand-of-ethical-hackers\/\">Python <\/a>and <a href=\"https:\/\/www.codelivly.com\/bash-quick-guide\/\">Bash <\/a>on Linux with Gedit. From basic \u201c<strong>Hello, World!<\/strong>\u201d scripts to practical file handling and system cleanup, you\u2019re now equipped to automate a variety of tasks. For more basics to advanced techniques, don\u2019t forget to check out <em>The Art of Offensive Scripting<\/em>. We have mentioned step by step on the ebook so don\u2019t miss it ..<\/p>\n<h2 class=\"wp-block-heading\"><strong>Automating Tasks with Python<\/strong><\/h2>\n<p>Alright, let\u2019s dive into automating tasks with Python! We\u2019re not just talking theory here\u2014we\u2019ll get right into some hands-on examples to make things crystal clear. And if you\u2019re hungry for more, our book <em><a href=\"https:\/\/codelivly.gumroad.com\/l\/the-art-of-offensive-scripting\">The Art of Offensive Scripting<\/a><\/em> goes into even greater depth.<\/p>\n<p>Python is super versatile for automation. Whether it\u2019s handling files, processing data, or managing system operations, Python has you covered. Let\u2019s start with some practical examples.<\/p>\n<h3 class=\"wp-block-heading\"><strong>Example 1: Renaming Files<\/strong><\/h3>\n<p>Imagine you have a bunch of files that need renaming\u2014say, you want to add a prefix to each file. Here\u2019s how you can automate that:<\/p>\n<p><strong>Create Your Script<\/strong>: Open Gedit and create a file named rename_files.py:<\/p>\n<p>   import os<\/p>\n<p>   # Path to the directory containing files<br \/>\n   path = &#8216;\/path\/to\/your\/directory&#8217;<\/p>\n<p>   # Loop through all files in the directory<br \/>\n   for filename in os.listdir(path):<br \/>\n       new_name = &#8216;prefix_&#8217; + filename<br \/>\n       os.rename(os.path.join(path, filename), os.path.join(path, new_name))<\/p>\n<p>   print(&#8220;Files renamed successfully!&#8221;)<\/p>\n<p><strong>Customize and Run<\/strong>: Replace &#8216;\/path\/to\/your\/directory&#8217; with the path to your actual directory. Save the file and run it with:<\/p>\n<p>   python3 rename_files.py<\/p>\n<p>Your files should now have a prefix!<\/p>\n<h3 class=\"wp-block-heading\"><strong>Example 2: Monitoring Disk Usage<\/strong><\/h3>\n<p>Let\u2019s say you want to keep an eye on disk usage and get an alert if it\u2019s getting too high. Here\u2019s a script for that:<\/p>\n<p><strong>Create Your Script<\/strong>: Open Gedit and create a file named disk_usage.py:<\/p>\n<p>   import shutil<\/p>\n<p>   # Set your threshold (e.g., 80% usage)<br \/>\n   threshold = 80<\/p>\n<p>   # Get disk usage<br \/>\n   total, used, free = shutil.disk_usage(&#8220;\/&#8221;)<\/p>\n<p>   # Calculate usage percentage<br \/>\n   usage_percentage = (used \/ total) * 100<\/p>\n<p>   # Check if usage exceeds the threshold<br \/>\n   if usage_percentage &gt; threshold:<br \/>\n       print(f&#8221;Warning! Disk usage is at {usage_percentage:.2f}%&#8221;)<br \/>\n   else:<br \/>\n       print(f&#8221;Disk usage is under control at {usage_percentage:.2f}%&#8221;)<\/p>\n<p><strong>Run Your Script<\/strong>: Save the file and run it with:<\/p>\n<p>   python3 disk_usage.py<\/p>\n<p>You\u2019ll get a warning if disk usage is too high!<\/p>\n<h3 class=\"wp-block-heading\"><strong>Example 3: Automating Email Notifications<\/strong><\/h3>\n<p>Here\u2019s a script to send automated email notifications. Make sure you have the smtplib and email libraries:<\/p>\n<p><strong>Create Your Script<\/strong>: Open Gedit and create a file named send_email.py:<\/p>\n<p>   import smtplib<br \/>\n   from email.mime.text import MIMEText<br \/>\n   from email.mime.multipart import MIMEMultipart<\/p>\n<p>   # Email settings<br \/>\n   sender_email = &#8216;your_email@example.com&#8217;<br \/>\n   receiver_email = &#8216;receiver@example.com&#8217;<br \/>\n   password = &#8216;your_password&#8217;<br \/>\n   subject = &#8216;Automated Email Notification&#8217;<br \/>\n   body = &#8216;This is an automated email sent from Python!&#8217;<\/p>\n<p>   # Create the email<br \/>\n   msg = MIMEMultipart()<br \/>\n   msg[&#8216;From&#8217;] = sender_email<br \/>\n   msg[&#8216;To&#8217;] = receiver_email<br \/>\n   msg[&#8216;Subject&#8217;] = subject<br \/>\n   msg.attach(MIMEText(body, &#8216;plain&#8217;))<\/p>\n<p>   # Send the email<br \/>\n   with smtplib.SMTP(&#8216;smtp.example.com&#8217;, 587) as server:<br \/>\n       server.starttls()<br \/>\n       server.login(sender_email, password)<br \/>\n       server.sendmail(sender_email, receiver_email, msg.as_string())<\/p>\n<p>   print(&#8220;Email sent successfully!&#8221;)<\/p>\n<p><strong>Customize and Run<\/strong>: Replace placeholders with your email details. Save the file and run it with:<\/p>\n<p>   python3 send_email.py<\/p>\n<p>Your email will be sent automatically! <\/p>\n<p><strong>Note<\/strong>: Make sure that you provide the permission before running the scripts. You can set permission simply using this command: chmod +x filename.py<\/p>\n<p>And there you have it\u2014some cool ways to automate tasks with Python. We\u2019ve just scratched the surface here, and if you\u2019re excited to learn more, check out our book <em>The Art of Offensive Scripting<\/em>. It\u2019s packed with advanced examples and in-depth techniques to take your scripting skills to the next level. <\/p>\n<p><strong><em>Discover: <a href=\"https:\/\/www.codelivly.com\/python-cheatsheet\/\">Python Mastery: The Ultimate Comprehensive Cheat Sheet for Beginners and Experts Alike<\/a><\/em><\/strong><\/p>\n<h2 class=\"wp-block-heading\"><strong>Automating Tasks with Bash<\/strong><\/h2>\n<p>First, we will cover how to carry out automation of tasks using Bash. For our case, Bash is really handy when you need to process system operations and even execute scripts right from your command line. In the next few sections, we need to walk through a couple of practical examples so you can get an idea of how much automation you can achieve with Bash. If you are hungry for more, our book The Art of Offensive Scripting gives a deep dive into these sub-products.<\/p>\n<h3 class=\"wp-block-heading\"><strong>Getting Started<\/strong><\/h3>\n<p><a href=\"https:\/\/www.codelivly.com\/bash-scripting-tutorial\/\">Bash scripts<\/a> are perfect for tasks like file management, system monitoring, and batch processing. Let\u2019s start with a few hands-on examples to get you comfortable.<\/p>\n<h3 class=\"wp-block-heading\"><strong>Example 1: Creating a Backup Script<\/strong><\/h3>\n<p>Imagine you need to back up files from one directory to another. Here\u2019s how you can automate that with Bash:<\/p>\n<p><strong>Create Your Script<\/strong>: Open Gedit and create a file named backup_files.sh:<\/p>\n<p>   #!\/bin\/bash<\/p>\n<p>   # Source and destination directories<br \/>\n   SOURCE_DIR=&#8221;\/path\/to\/source&#8221;<br \/>\n   BACKUP_DIR=&#8221;\/path\/to\/backup&#8221;<\/p>\n<p>   # Create backup directory if it doesn&#8217;t exist<br \/>\n   mkdir -p $BACKUP_DIR<\/p>\n<p>   # Copy files to the backup directory<br \/>\n   cp -r $SOURCE_DIR\/* $BACKUP_DIR\/<\/p>\n<p>   echo &#8220;Backup completed successfully!&#8221;<\/p>\n<p><strong>Customize and Run<\/strong>: Replace \/path\/to\/source and \/path\/to\/backup with your actual paths. Save the file, make it executable with chmod +x backup_files.sh, and run it with:<\/p>\n<p>   .\/backup_files.sh<\/p>\n<p>Your files will be backed up!<\/p>\n<h3 class=\"wp-block-heading\"><strong>Example 2: Cleaning Up Old Files<\/strong><\/h3>\n<p>Here\u2019s a script to delete old files from a directory. This is useful for cleaning up temporary files:<\/p>\n<p><strong>Create Your Script<\/strong>: Open Gedit and create a file named cleanup_old_files.sh:<\/p>\n<p>   #!\/bin\/bash<\/p>\n<p>   # Directory to clean up<br \/>\n   TARGET_DIR=&#8221;\/path\/to\/your\/directory&#8221;<\/p>\n<p>   # Find and delete files older than 30 days<br \/>\n   find $TARGET_DIR -type f -mtime +30 -exec rm {} ;<\/p>\n<p>   echo &#8220;Old files cleaned up!&#8221;<\/p>\n<p><strong>Customize and Run<\/strong>: Replace \/path\/to\/your\/directory with your directory path. Save the file, make it executable with chmod +x cleanup_old_files.sh, and run it with:<\/p>\n<p>   .\/cleanup_old_files.sh<\/p>\n<p>Old files will be removed!<\/p>\n<h3 class=\"wp-block-heading\"><strong>Example 3: Monitoring System Resources<\/strong><\/h3>\n<p>Let\u2019s create a script to check your system\u2019s memory usage and alert you if it\u2019s getting too high:<\/p>\n<p><strong>Create Your Script<\/strong>: Open Gedit and create a file named monitor_memory.sh:<\/p>\n<p>   #!\/bin\/bash<\/p>\n<p>   # Set your memory usage threshold (e.g., 80%)<br \/>\n   THRESHOLD=80<\/p>\n<p>   # Get memory usage percentage<br \/>\n   MEMORY_USAGE=$(free | grep Mem | awk &#8216;{print $3\/$2 * 100.0}&#8217;)<\/p>\n<p>   # Check if memory usage exceeds the threshold<br \/>\n   if (( $(echo &#8220;$MEMORY_USAGE &gt; $THRESHOLD&#8221; | bc -l) )); then<br \/>\n       echo &#8220;Warning! Memory usage is at ${MEMORY_USAGE}%&#8221;<br \/>\n   else<br \/>\n       echo &#8220;Memory usage is under control at ${MEMORY_USAGE}%&#8221;<br \/>\n   fi<\/p>\n<p><strong>Run Your Script<\/strong>: Save the file, make it executable with chmod +x monitor_memory.sh, and run it with:<\/p>\n<p>   .\/monitor_memory.sh<\/p>\n<p>You\u2019ll get an alert if memory usage is too high!<\/p>\n<h3 class=\"wp-block-heading\"><strong>Running Scripts Automatically<\/strong><\/h3>\n<p>To automate running your Bash scripts:<\/p>\n<p><strong>Use Cron Jobs<\/strong>: Open your crontab with crontab -e and add a line like 0 2 * * * \/path\/to\/backup_files.sh to run your script daily at 2 AM.<\/p>\n<p>That\u2019s it for automating tasks with Bash! From backing up files to cleaning up old data and monitoring system resources, Bash scripts can handle a lot of your routine tasks. For even more advanced scripting techniques and examples, don\u2019t forget to check out our book <em><strong><a href=\"https:\/\/codelivly.gumroad.com\/l\/the-art-of-offensive-scripting\">The Art of Offensive Scripting<\/a><\/strong><\/em>. It\u2019s loaded with in-depth content to take your Bash scripting to the next level.<\/p>\n<h2 class=\"wp-block-heading\"><strong>Integrating Python and Bash<\/strong><\/h2>\n<p>Ok, so here\u2019s how you can further super power your automation by mixing Python with Bash. Combine them both and these individual scripts turn into a powerhouse that will speed up your workflow. This post cover some use cases through practical examples to demonstrate how they can work together. And for a deep dive take a look at our book: <strong><em><a href=\"https:\/\/codelivly.gumroad.com\/l\/the-art-of-offensive-scripting\">The Art of Offensive Scripting<\/a><\/em><\/strong><\/p>\n<p>Python is superb for processing data, branching logic, and everything else that is not related to quick system tasks or file management unique to Bash. You can use them together to get the best of both in one workflow.<\/p>\n<h3 class=\"wp-block-heading\"><strong>Example 1: Running a Python Script from Bash<\/strong><\/h3>\n<p>Let\u2019s say you have a Python script that processes data, and you want to run it from a Bash script. Here\u2019s how you can do it:<\/p>\n<p><strong>Create Your Python Script<\/strong>: Open Gedit and create a file named process_data.py:<\/p>\n<p>   # process_data.py<br \/>\n   import sys<\/p>\n<p>   def main(input_file):<br \/>\n       with open(input_file, &#8216;r&#8217;) as file:<br \/>\n           data = file.read()<br \/>\n           print(f&#8221;Data from {input_file}:&#8221;)<br \/>\n           print(data)<\/p>\n<p>   if __name__ == &#8220;__main__&#8221;:<br \/>\n       if len(sys.argv) != 2:<br \/>\n           print(&#8220;Usage: python process_data.py &lt;file&gt;&#8221;)<br \/>\n       else:<br \/>\n           main(sys.argv[1])<\/p>\n<p><strong>Create Your Bash Script<\/strong>: Open Gedit and create a file named run_process.sh:<\/p>\n<p>   #!\/bin\/bash<\/p>\n<p>   # Path to your input file<br \/>\n   INPUT_FILE=&#8221;\/path\/to\/your\/file.txt&#8221;<\/p>\n<p>   # Run the Python script<br \/>\n   python3 process_data.py $INPUT_FILE<\/p>\n<p><strong>Run Your Scripts<\/strong>: Save both files, make the Bash script executable with chmod +x run_process.sh, and run it with:<\/p>\n<p>   .\/run_process.sh<\/p>\n<p>This will execute the Python script from within the Bash script.<\/p>\n<h3 class=\"wp-block-heading\"><strong>Example 2: Using Bash to Prepare Data for Python<\/strong><\/h3>\n<p>Suppose you need to prepare a file before processing it with a Python script. Here\u2019s how you can do it:<\/p>\n<p><strong>Create Your Bash Script<\/strong>: Open Gedit and create a file named prepare_data.sh:<\/p>\n<p>   #!\/bin\/bash<\/p>\n<p>   # Create a sample file<br \/>\n   echo &#8220;Sample data for processing&#8221; &gt; sample_data.txt<\/p>\n<p>   # Run the Python script<br \/>\n   python3 process_data.py sample_data.txt<\/p>\n<p><strong>Run Your Bash Script<\/strong>: Make it executable with chmod +x prepare_data.sh, and then run:<\/p>\n<p>   .\/prepare_data.sh<\/p>\n<p>This will create a file and then pass it to the Python script for processing.<\/p>\n<h3 class=\"wp-block-heading\"><strong>Example 3: Using Python to Generate a Bash Command<\/strong><\/h3>\n<p>Sometimes, you might want to use Python to generate a Bash command dynamically. Here\u2019s an example:<\/p>\n<p><strong>Create Your Python Script<\/strong>: Open Gedit and create a file named generate_command.py:<\/p>\n<p>   # generate_command.py<br \/>\n   import sys<\/p>\n<p>   def generate_command(file_path):<br \/>\n       command = f&#8221;cat {file_path} | grep &#8216;example'&#8221;<br \/>\n       print(command)<\/p>\n<p>   if __name__ == &#8220;__main__&#8221;:<br \/>\n       if len(sys.argv) != 2:<br \/>\n           print(&#8220;Usage: python generate_command.py &lt;file&gt;&#8221;)<br \/>\n       else:<br \/>\n           generate_command(sys.argv[1])<\/p>\n<p><strong>Create Your Bash Script<\/strong>: Open Gedit and create a file named run_generated_command.sh:<\/p>\n<p>   #!\/bin\/bash<\/p>\n<p>   # Generate the command using Python<br \/>\n   COMMAND=$(python3 generate_command.py \/path\/to\/your\/file.txt)<\/p>\n<p>   # Run the generated command<br \/>\n   eval $COMMAND<\/p>\n<p><strong>Run Your Scripts<\/strong>: Save both files, make the Bash script executable with chmod +x run_generated_command.sh, and run:<\/p>\n<p>   .\/run_generated_command.sh<\/p>\n<p>This will generate and execute a Bash command based on the Python script\u2019s output.<\/p>\n<p>Here\u2019s a practical and casual conclusion for the article:<\/p>\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n<p>These are just the basics for getting new scripts working when calling Python from bash and vice versa, but this introduction should at least get you started in uncharted territory! We discussed everything from basic \u201cHello, World!\u201d variations to more complex patterns like filters and conversational assistance. scripts to even complex file management and system monitoring. You have also learned how Python and Bash can together improve your workflow to be productive across a wider range of tasks.<\/p>\n<p>If you\u2019re eager to dive deeper and explore advanced techniques, don\u2019t forget to check out our book <em><strong><a href=\"https:\/\/codelivly.gumroad.com\/l\/the-art-of-offensive-scripting\" target=\"_blank\" rel=\"noopener\">The Art of Offensive Scripting<\/a><\/strong><\/em>. It\u2019s packed with detailed examples and in-depth content to help you master automation and scripting.<\/p>\n<p>Thanks for following along! Happy automating, and see you next time!<\/p>","protected":false},"excerpt":{"rendered":"<p>Hey there! You ever think about how amazing it would be to just automate your life a lot more every time by setting up systems, and all this stuff? Be it file management, task scheduling, or dealing with intricate processes \u2014 automation is the answer. For automation, use Python and Bash. This article covers just [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-296","post","type-post","status-publish","format-standard","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/cybersecurityinfocus.com\/index.php?rest_route=\/wp\/v2\/posts\/296"}],"collection":[{"href":"https:\/\/cybersecurityinfocus.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cybersecurityinfocus.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/cybersecurityinfocus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=296"}],"version-history":[{"count":0,"href":"https:\/\/cybersecurityinfocus.com\/index.php?rest_route=\/wp\/v2\/posts\/296\/revisions"}],"wp:attachment":[{"href":"https:\/\/cybersecurityinfocus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=296"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cybersecurityinfocus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=296"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cybersecurityinfocus.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=296"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}