{"id":98,"date":"2008-09-14T13:27:25","date_gmt":"2008-09-14T13:27:25","guid":{"rendered":"https:\/\/fir3netwp.gmsrrpobkbd.com\/2008\/09\/14\/f-prot-scripts\/"},"modified":"2021-07-31T17:55:58","modified_gmt":"2021-07-31T17:55:58","slug":"f-prot-scripts","status":"publish","type":"post","link":"https:\/\/www.fir3net.com\/Programming\/Shell-Scripting\/f-prot-scripts.html","title":{"rendered":"BASH – F-Prot Scripts"},"content":{"rendered":"

Here are 2 scripts created for the AV software F-Prot,<\/p>\n

FProt_scan<\/h2>\n

Runs a scan on your system, you will need to enter you own path under the variable $path<\/p>\n

#!\/bin\/bash\r\n\r\n#Variables\r\npath=\/\r\n\r\n#binaries\r\nfprot=\/usr\/local\/f-prot\/f-prot\r\n\r\nif [ ! -x \"${fprot}\" ]; then\r\n        echo \"Error: ${fprot} not found or not executable!\" | \/usr\/bin\/logger -t fprot_scan -p daemon.err\r\n        exit 1\r\nfi\r\n\r\n${f-prot} ${path} -disinf -silent -report=\/var\/log\/fprot.log -dumb -archive -server -collect -ai\r\nRC=$?\r\n\r\nif [ ${RC} != 0 ]; then\r\n        echo \"Error: ${fprot} returned rc=${RC}\" | \/usr\/bin\/logger -t fprot_scan -p daemon.err\r\nelse\r\n        echo \"Completed successfully\" | \/usr\/bin\/logger -t fprot_scan -p daemon.err\r\nfi\r\n\r\nexit ${RC}\r\n<\/pre>\n

FProt_mail<\/h2>\n

Emails you if a virus has been found on your system, you will need to add your own email address to $email<\/p>\n

#!\/bin\/bash\r\n\r\n#variables\r\nemail=\"myemail@somewhere.com\"\r\n\r\n#binaries\r\nmailx=\/usr\/bin\/mailx\r\n\r\nif [ ! -x \"${mailx}\" ]; then\r\n        echo \"Error: ${mailx} not found or not executable!\" | \/usr\/bin\/logger -t fprot_mail -p daemon.err\r\n        exit 1\r\nfi\r\n\r\nif egrep \"viruse|boot|suspicious\" \/var\/log\/fprot.log | grep -q No ; then \r\n\techo \"Complete: No Email = No Virus\" | \/usr\/bin\/logger -t fprot_mail -p daemon.err\t\r\nelse\r\n\tcat \/var\/log\/fprot.log | mailx -s \"F-Prot Scan Results\" ${email}\r\n\techo \"Complete: F-Prot Email Sent\" | \/usr\/bin\/logger -t fprot_mail -p daemon.err\r\nfi\r\n\r\nexit 0\r\n<\/pre>\n

After adding the scripts to crontab. Contrab should look like this,<\/p>\n

0 3 * * * \/usr\/local\/f-prot\/tools\/check-updates.pl -cron -quiet
\n0 4 * * * \/home\/localuser\/scripts\/fprot_scan.sh \/dev\/null 2>&1
\n0 5 * * * \/home\/localuser\/scripts\/fprot_mail.sh \/dev\/null 2>&1<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"

Here are 2 scripts created for the AV software F-Prot, FProt_scan Runs a scan on your system, you will need to enter you own path under the variable $path #!\/bin\/bash #Variables path=\/ #binaries fprot=\/usr\/local\/f-prot\/f-prot if [ ! -x “${fprot}” ]; then echo “Error: ${fprot} not found or not executable!” | \/usr\/bin\/logger -t fprot_scan -p daemon.err … Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[40],"tags":[],"yoast_head":"\nBASH - F-Prot Scripts - Fir3net<\/title>\n<meta name=\"description\" content=\"Here are 2 scripts created for the AV software F-Prot, FProt_scan Runs a scan on your system, you will need to enter you own path under the variable $path\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.fir3net.com\/Programming\/Shell-Scripting\/f-prot-scripts.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"BASH - F-Prot Scripts - Fir3net\" \/>\n<meta property=\"og:description\" content=\"Here are 2 scripts created for the AV software F-Prot, FProt_scan Runs a scan on your system, you will need to enter you own path under the variable $path\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.fir3net.com\/Programming\/Shell-Scripting\/f-prot-scripts.html\" \/>\n<meta property=\"og:site_name\" content=\"Fir3net\" \/>\n<meta property=\"article:published_time\" content=\"2008-09-14T13:27:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-07-31T17:55:58+00:00\" \/>\n<meta name=\"author\" content=\"Rick Donato\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rick Donato\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.fir3net.com\/Programming\/Shell-Scripting\/f-prot-scripts.html#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.fir3net.com\/Programming\/Shell-Scripting\/f-prot-scripts.html\"},\"author\":{\"name\":\"Rick Donato\",\"@id\":\"https:\/\/www.fir3net.com\/#\/schema\/person\/ab35009601b7687ee1c5310be6038037\"},\"headline\":\"BASH – F-Prot Scripts\",\"datePublished\":\"2008-09-14T13:27:25+00:00\",\"dateModified\":\"2021-07-31T17:55:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.fir3net.com\/Programming\/Shell-Scripting\/f-prot-scripts.html\"},\"wordCount\":96,\"publisher\":{\"@id\":\"https:\/\/www.fir3net.com\/#organization\"},\"articleSection\":[\"Shell Scripting\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.fir3net.com\/Programming\/Shell-Scripting\/f-prot-scripts.html\",\"url\":\"https:\/\/www.fir3net.com\/Programming\/Shell-Scripting\/f-prot-scripts.html\",\"name\":\"BASH - F-Prot Scripts - Fir3net\",\"isPartOf\":{\"@id\":\"https:\/\/www.fir3net.com\/#website\"},\"datePublished\":\"2008-09-14T13:27:25+00:00\",\"dateModified\":\"2021-07-31T17:55:58+00:00\",\"description\":\"Here are 2 scripts created for the AV software F-Prot, FProt_scan Runs a scan on your system, you will need to enter you own path under the variable $path\",\"breadcrumb\":{\"@id\":\"https:\/\/www.fir3net.com\/Programming\/Shell-Scripting\/f-prot-scripts.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.fir3net.com\/Programming\/Shell-Scripting\/f-prot-scripts.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.fir3net.com\/Programming\/Shell-Scripting\/f-prot-scripts.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.fir3net.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Programming\",\"item\":\"https:\/\/www.fir3net.com\/programming\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Shell Scripting\",\"item\":\"https:\/\/www.fir3net.com\/programming\/shell-scripting\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"BASH – F-Prot Scripts\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.fir3net.com\/#website\",\"url\":\"https:\/\/www.fir3net.com\/\",\"name\":\"Fir3net\",\"description\":\"Keeping you in the know\",\"publisher\":{\"@id\":\"https:\/\/www.fir3net.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.fir3net.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.fir3net.com\/#organization\",\"name\":\"Fir3net\",\"url\":\"https:\/\/www.fir3net.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.fir3net.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.fir3net.com\/wp-content\/uploads\/Fir3net-Background-Logo-compressed.png\",\"contentUrl\":\"https:\/\/www.fir3net.com\/wp-content\/uploads\/Fir3net-Background-Logo-compressed.png\",\"width\":390,\"height\":88,\"caption\":\"Fir3net\"},\"image\":{\"@id\":\"https:\/\/www.fir3net.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.fir3net.com\/#\/schema\/person\/ab35009601b7687ee1c5310be6038037\",\"name\":\"Rick Donato\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.fir3net.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d75d69a54c0ca3b32c24c3a9703b623c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d75d69a54c0ca3b32c24c3a9703b623c?s=96&d=mm&r=g\",\"caption\":\"Rick Donato\"},\"description\":\"Rick Donato is a Network Automation Architect\/Evangelist and the founder of Packet Coders.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"BASH - F-Prot Scripts - Fir3net","description":"Here are 2 scripts created for the AV software F-Prot, FProt_scan Runs a scan on your system, you will need to enter you own path under the variable $path","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.fir3net.com\/Programming\/Shell-Scripting\/f-prot-scripts.html","og_locale":"en_US","og_type":"article","og_title":"BASH - F-Prot Scripts - Fir3net","og_description":"Here are 2 scripts created for the AV software F-Prot, FProt_scan Runs a scan on your system, you will need to enter you own path under the variable $path","og_url":"https:\/\/www.fir3net.com\/Programming\/Shell-Scripting\/f-prot-scripts.html","og_site_name":"Fir3net","article_published_time":"2008-09-14T13:27:25+00:00","article_modified_time":"2021-07-31T17:55:58+00:00","author":"Rick Donato","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Rick Donato","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.fir3net.com\/Programming\/Shell-Scripting\/f-prot-scripts.html#article","isPartOf":{"@id":"https:\/\/www.fir3net.com\/Programming\/Shell-Scripting\/f-prot-scripts.html"},"author":{"name":"Rick Donato","@id":"https:\/\/www.fir3net.com\/#\/schema\/person\/ab35009601b7687ee1c5310be6038037"},"headline":"BASH – F-Prot Scripts","datePublished":"2008-09-14T13:27:25+00:00","dateModified":"2021-07-31T17:55:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.fir3net.com\/Programming\/Shell-Scripting\/f-prot-scripts.html"},"wordCount":96,"publisher":{"@id":"https:\/\/www.fir3net.com\/#organization"},"articleSection":["Shell Scripting"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.fir3net.com\/Programming\/Shell-Scripting\/f-prot-scripts.html","url":"https:\/\/www.fir3net.com\/Programming\/Shell-Scripting\/f-prot-scripts.html","name":"BASH - F-Prot Scripts - Fir3net","isPartOf":{"@id":"https:\/\/www.fir3net.com\/#website"},"datePublished":"2008-09-14T13:27:25+00:00","dateModified":"2021-07-31T17:55:58+00:00","description":"Here are 2 scripts created for the AV software F-Prot, FProt_scan Runs a scan on your system, you will need to enter you own path under the variable $path","breadcrumb":{"@id":"https:\/\/www.fir3net.com\/Programming\/Shell-Scripting\/f-prot-scripts.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.fir3net.com\/Programming\/Shell-Scripting\/f-prot-scripts.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.fir3net.com\/Programming\/Shell-Scripting\/f-prot-scripts.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.fir3net.com\/"},{"@type":"ListItem","position":2,"name":"Programming","item":"https:\/\/www.fir3net.com\/programming"},{"@type":"ListItem","position":3,"name":"Shell Scripting","item":"https:\/\/www.fir3net.com\/programming\/shell-scripting"},{"@type":"ListItem","position":4,"name":"BASH – F-Prot Scripts"}]},{"@type":"WebSite","@id":"https:\/\/www.fir3net.com\/#website","url":"https:\/\/www.fir3net.com\/","name":"Fir3net","description":"Keeping you in the know","publisher":{"@id":"https:\/\/www.fir3net.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.fir3net.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.fir3net.com\/#organization","name":"Fir3net","url":"https:\/\/www.fir3net.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.fir3net.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.fir3net.com\/wp-content\/uploads\/Fir3net-Background-Logo-compressed.png","contentUrl":"https:\/\/www.fir3net.com\/wp-content\/uploads\/Fir3net-Background-Logo-compressed.png","width":390,"height":88,"caption":"Fir3net"},"image":{"@id":"https:\/\/www.fir3net.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.fir3net.com\/#\/schema\/person\/ab35009601b7687ee1c5310be6038037","name":"Rick Donato","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.fir3net.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d75d69a54c0ca3b32c24c3a9703b623c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d75d69a54c0ca3b32c24c3a9703b623c?s=96&d=mm&r=g","caption":"Rick Donato"},"description":"Rick Donato is a Network Automation Architect\/Evangelist and the founder of Packet Coders."}]}},"_links":{"self":[{"href":"https:\/\/www.fir3net.com\/wp-json\/wp\/v2\/posts\/98"}],"collection":[{"href":"https:\/\/www.fir3net.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fir3net.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fir3net.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fir3net.com\/wp-json\/wp\/v2\/comments?post=98"}],"version-history":[{"count":0,"href":"https:\/\/www.fir3net.com\/wp-json\/wp\/v2\/posts\/98\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.fir3net.com\/wp-json\/wp\/v2\/media?parent=98"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fir3net.com\/wp-json\/wp\/v2\/categories?post=98"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fir3net.com\/wp-json\/wp\/v2\/tags?post=98"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}