Find Jobs
Hire Freelancers

Write a script in Python to monitor for connected USB storage devices

$30-250 AUD

Completed
Posted almost 7 years ago

$30-250 AUD

Paid on delivery
I would like a script written in Python to perform the follow: - Create a variable at the top of the script called "SendTo" which will contain an email address (put example email address for now) - Create a variable at the top of the script called "Subject" which will contain an email subject (put "Scan report follows....") - Monitor for when a USB storage device is connected - When a USB storage device is connected -- Clean /home/temp of all contents (just in case) -- Note the number of volumes on the storage device -- Do a loop through each of the volumes repeating these steps --- Put the volume label of the partition into a variable called "VOLUMELABEL". If there is no volume label, use "volume x" as the value, where x is the partition/volume number (0, 1, 2, 3, etc) --- Copy the contents of the volume to /home/temp/VOLUMELABEL (where VOLUMELABEL is the variable you created above) including sub folders, hidden files and full directory tree -- Repeat above process till all volumes copies to /home/temp -- Scan the contents of /home/temp (including all subfolders) with ClamAV --- If ClamAV finds no malware, move the contents of /home/temp to /home/collection/YYYYMMDD/HHmm/ where YYYY is numeric year, MM is numeric month with leading zero, DD is numeric day with leading zero, HH is 24-hour numeric time with leading zero, and mm is numeric minutes, with leading zero -- ClamAV should be set to move anything infected to a quarantine folder (/home/quarantine) or delete it if necessary -- Ensure /home/temp is clean (remove anything left if it wasn't moved properly) - Send email to SendTo variable above with subject Subject above (from variables) showing a list of the files copied, the output from ClamAV and a status of "Clean" or "Infected" added to the beginning of the subject line (ie: "Clean: $Subject blah blah") - Unmount the USB storage device - Sit and wait till another storage device is connected and repeat process A second script to run be run via a cron job that when run - Has a variable "Age" at the start that specifies how many days old a copy should be (set to 30 to start) - Firstly checks to make sure the first script isn't running, or hasnt run for the last hour - If safe to proceed, removes all files and folders older than 30 days from /home/collection (leveraging the YYYYMMDD directory structure to help identify age of folders) - If not safe to proceed, exits
Project ID: 14260151

About the project

11 proposals
Remote project
Active 7 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
i have skills in linux programming, python which make god candidate for this project Relevant Skills and Experience linux programming , python Proposed Milestones $111 AUD - script
$111 AUD in 3 days
5.0 (7 reviews)
2.4
2.4
11 freelancers are bidding on average $163 AUD for this job
User Avatar
You asked for a Python script, but I would suggest you to do this using a shell script, I can do this in that way, one consideration, I never used claimav, I will need to read some documentation to.. Relevant Skills and Experience Know how to capture its output; About the mail with the files resume, about moving files to quarantine folder or even delete them: I will need read about this too. Just contact me in case you want.. Proposed Milestones $200 AUD - Main Me to get in movement with this documentation.
$200 AUD in 3 days
4.9 (17 reviews)
4.5
4.5
User Avatar
I will build this using Python for Linux. Relevant Skills and Experience Python, Linux, Shell scripting Proposed Milestones $250 AUD - A script which fulfills all(& only those requirements) requirements mentioned in project description Please share the Linux distro name for this script.
$250 AUD in 15 days
4.8 (7 reviews)
3.5
3.5
User Avatar
We can write python script for you, that will do the task you've described here. Relevant Skills and Experience We've build many different applications in Python, PHP, AJAX along with using libraries of respective languages. Proposed Milestones $200 AUD - Project You can ask more in chat. Thank you
$200 AUD in 5 days
5.0 (1 review)
1.8
1.8
User Avatar
Hello, man Relevant Skills and Experience Thank you for your job offer. I am confident at it and I am the right one you want. I can finish this task on time you want. Call me with no hesitate. Best regards. From RisingSuperStar Proposed Milestones $155 AUD - 1
$155 AUD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hello,   Over the last 7 years, I have worked for several clients. Joined Freelancer with over 7 years of experience in , Data entry, Linkedin Lead generation , Google Research Expert,Web scraping.  Python and Scrapping expert with 5 years of experience.  Linkedin API developer.  Using Python, Wordpress , C Programming ,  C++ Programming, Linux,PHP,MYSQL ,Java ,Javascript ,Website Design ,Graphic Design,CSS,Research,Wordpress ,Magento ,Leads ,Web Search ,Machine Learning ,HTML5 ,Linkedin ,Landing Pages ,Web Services ,Internet Research ,Angular.js ,,Data mining,,Web scrapping,Find contacts, Data Processing,  I am a highly skilled web researcher,data entry provider seeking an opportunity to leverage my expertise and demonstrate my high level of technical an administrative skills.  I have successfully completed more than 100 projects ranging from web research, data entry, Internet Research, Linkedin Lead Generation, Google docs & Excel Spreadsheet creation/editing.  Regards:Nabeel
$35 AUD in 5 days
0.0 (0 reviews)
0.0
0.0
User Avatar
don't you worry we will handle it with care . quick and free 1 revision Relevant Skills and Experience Python php nodeJs Proposed Milestones $155 AUD - extra Care
$155 AUD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
A proposal has not yet been provided
$100 AUD in 7 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Use a Python application as background daemon to detect new devices connecting to the machine. Call CamAV and parse the output to detect malicious files, remove all permissions to malicious files. Relevant Skills and Experience I have worked with Python for several years, and have made many python application both in Windows and Linux systems. Proposed Milestones $100 AUD - USB detection and mounting of the volume $150 AUD - ClamAV integration and quarantine of malicious files Additional Services Offered $20 AUD - Create startup script for a Linux distribution
$250 AUD in 3 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of AUSTRALIA
Bundall, Australia
5.0
9
Payment method verified
Member since Aug 26, 2012

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.