RSS WordPress Blog
  • The Month in WordPress: June 2020 July 2, 2020
    June was an exciting month for WordPress! Major changes are coming to the Gutenberg plugin, and WordCamp Europe brought the WordPress community closer together. Read on to learn more and to get all the latest updates.  WordPress 5.4.2 released We said hello to WordPress 5.4.2 on June 10. This security and maintenance release features 17 […]
    Hari Shanker R
  • WordPress 5.4.2 Security and Maintenance Release June 10, 2020
    WordPress 5.4.2 is now available! This security and maintenance release features 23 fixes and enhancements. Plus, it adds a number of security fixes—see the list below. These bugs affect WordPress versions 5.4.1 and earlier; version 5.4.2 fixes them, so you’ll want to upgrade. If you haven’t yet updated to 5.4, there are also updated versions […]
    Jake Spurlock
  • Equity and the Power of Community June 6, 2020
    Over the past week, I’ve been thinking a lot about George Floyd, Breonna Taylor, and Ahmaud Arbery. I have been thinking about white supremacy, the injustice that Black women and men are standing up against across the world, and all the injustices I can’t know, and don’t see.  The WordPress mission is to democratize publishing, […]
  • The Month in WordPress: May 2020 June 2, 2020
    May was an action-packed month for WordPress! WordPress organizers are increasingly moving WordCamps online, and contributors are taking big steps towards Full Site Editing with Gutenberg. To learn more and get all the latest updates, read on.  Gutenberg 8.1 and 8.2 Gutenberg 8.1 was released on May 13, followed quickly by Gutenberg 8.2 on May […]
    Angela Jin
  • The Month in WordPress: April 2020 May 4, 2020
    April continued to be a challenging time for the WordPress community, with many under stay-at-home recommendations. However, it was also an exciting month in which we created new ways to connect with and inspire each other! This month, amazing contributors moved more WordCamps online and shipped new releases for WordPress and Gutenberg. For the latest, […]
    Angela Jin
  • WordPress 5.4.1 April 29, 2020
    WordPress 5.4.1 is now available! This security and maintenance release features 17 bug fixes in addition to 7 security fixes. Because this is a security release, it is recommended that you update your sites immediately. All versions since WordPress 3.7 have also been updated. WordPress 5.4.1 is a short-cycle security and maintenance release. The next […]
    Jake Spurlock
  • People of WordPress: Mario Peshev April 8, 2020
    In the April edition of our "People of WordPress" series, you'll find out how Mario Peshev went from self-taught developer to teaching basic digital literacy.
    Yvette Sonneveld
  • The Month in WordPress: March 2020 April 3, 2020
    The month of March was both a tough and exciting time for the WordPress open-source project. With COVID-19 declared a pandemic, in-person events have had to adapt quickly – a challenge for any community. March culminated with the release of WordPress 5.4, an exhilarating milestone only made possible by dedicated contributors. For all the latest, […]
    Hugh Lashbrooke
  • WordPress 5.4 “Adderley” March 31, 2020
    Version 5.4 "Adderley" of WordPress is available for download or update in your WordPress dashboard. This version brings you more ways to make content come alive with your best images and helps make your vision real by putting blocks in the perfect place.
    Matt Mullenweg
  • WordPress 5.4 RC5 March 28, 2020
    The fifth release candidate for WordPress 5.4 is live! WordPress 5.4 is currently scheduled to land on March 31 2020, and we need your help to get there—if you haven’t tried 5.4 yet, now is the time! You can test the WordPress 5.4 release candidate in two ways: Try the WordPress Beta Tester plugin (choose the “bleeding edge nightlies” option) […]
    David Baumwald
RSS Sucuri Blog
  • Vulnerabilities Digest: June 2020 July 6, 2020
    Highlights for June 2020 Cross site scripting is still the most common vulnerability in WordPress Plugins. Bad actors are taking advantage of the lack of restrictions in critical functions and issues surrounding user input data sanitization. Massive local file inclusion (LFI) attempts have been discovered attempting to harvest WordPress and Magento credentials. Attackers continue to […]
    John Castro
  • Dangerous Website Backups July 2, 2020
    It’s a well-known fact that website backups are important for mitigating a plethora of site issues. They can help restore a site after a compromise or even facilitate the investigative process by providing a clean code base to compare the current site state to. However, if a backup is not set up correctly, it can […]
    Denis Sinegubko
  • Sucuri Academy: Free Website Security Courses June 29, 2020
    We are happy to announce that we have launched Sucuri Academy to offer free website security courses. Our main goal at Sucuri is to make the internet a safer place. One of our investments is creating the best educational content about website security to share our knowledge with the community. With that in mind, we […]
    Juliana Lewis
  • Sucuri Sit-Down Episode 2: Malware Types Explained with Krasimir Konov June 24, 2020
    Malware comes in many different varieties. Analyst Krasimir Konov is on this month’s Sucuri Sit-Down to help keep them all straight. From malicious iframes to SEO spam, join host Justin Channell as he racks Krasimir’s brain on all the different types of malware. Also, Krasimir discusses his recent blog post about a malicious cURL downloader, […]
    Justin Channell
  • Cross Site Scripting in YITH WooCommerce Ajax Product Filter June 22, 2020
    During a routine research audit for our Sucuri Web Application Firewall, we discovered a cross-site scripting (XSS) vulnerability affecting 100,000+ users of the YITH WooCommerce Ajax Product Filter  plugin. Current State of the Vulnerability This security bug was fixed in the 3.11.1 release. We are not aware of any exploit attempts currently using this vulnerability. […]
    John Castro
  • Experience + Technology: How We Clean Infected Websites at Sucuri June 16, 2020
    Our malware removal service is particularly effective because it combines automated and human elements. The process gets off to a quick start thanks to cleanup scripts developed by our threat researchers. Real people also get their hands dirty handling tough work that shouldn’t be automated. The automated scripts identify and remove a lot of website […]
    Art Martori
  • What is the Gibberish Hack? June 12, 2020
    Discovering some random folder with numbers and letters you don’t remember on your website would make any website owner put on their detective cap. At first, you may think, “Did I leave my FTP client open and my cat ran across the keyboard?” But when you open the folder, you find a series of HTML […]
    Justin Channell
  • What is a Website Defacement? June 9, 2020
    Website defacement is the most obvious sign of a hack. In these cases, bad actors who have gained access to an environment leave their mark through digital vandalism. For website owners, it means trying to access your homepage, only to find all of the code and content you’ve worked on replaced with something like this: […]
    Justin Channell
  • Evasion Tactics in Hybrid Credit Card Skimmers June 5, 2020
    The most common type of Magento credit card stealing malware is client-side JavaScript that grabs data entered in a checkout form and sends it to a third-party server controlled by the attackers. Though popular with bad actors, one of the drawbacks of this approach is that it’s possible to track requests to suspicious servers if […]
    Denis Sinegubko
  • Labs Notes Monthly Recap – May/2020 June 3, 2020
    In 2020, we doubled up our research efforts to report on many new attacks and hacks that we see in the wild. We believe that being informed is a big part of having a good website security posture. Sucuri Labs provides website malware research updates directly from our teams on the front line. Our Labs […]
    Juliana Lewis

Bash Cases Statement

Posted by on 9:14 am in Bash Script | 7 comments

The case construct in bash shell allows us to test strings against patterns that can contain wild card characters. Bash case statement is the simplest form of the bash if else then condition statement. The simple example for this is if you are expecting different inputs from a user and want to execute specific command sets on the choice used.     case $variable in pattern1 ) statements ;; pattern2 ) statements ;; * ) statements ;; … esac   We can see the common use of the case statement in the init scripts of the services which has the options like start, stop, restart and status.  ...

read more