JSFiddle - React, Tailwind, and code Playground

by Hassan Siddiqui

HTML

#!/bin/bash
present01=`egrep "lp:|uucp:|nuccp:" /etc/passwd`

if [ `cat /etc/passwd | egrep "lp:|uucp:|nuccp:" | wc -l` -eq 0 ]
	then
		result01="양호"
		gct=0
		gct=$((gct+1))
	else
		result01="취약"
		bct=0
		bct=$((bct+1))
fi
######################################################################
title02="root 권한관리"
present02=`awk -F: '$3==0 { print $1 " -> UID="$3 }' /etc/passwd`

if [ `awk -F: '$3==0' /etc/passwd | wc -l` -eq 1 ]
	then
		result02="양호"
		gct=$((gct+1))
	else
		result02="취약"
		bct=$((bct+1))
fi

cat <<- _EOF_ > "14501025LJH_Unix Vulnerability Report".html
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8"> 
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha/css/bootstrap.min.css" rel="stylesheet" />
<script>
$(document).ready(function() {
  $('.table tr td').each(function(i, v){
    if(v.textContent === 'GOOD') {
      $(v.parentElement).addClass('table-success');
    } else if(v.textContent === 'BAD') {
      $(v.parentElement).addClass('table-danger');
    }
  })  
})
</script>
<table data-row-style="rowStyle" class="table table-bordered table-hover thead-dark thead-inverse">
  <thead>
    <tr>
      <th scope="col" style="width: 8%" class="text-center">Number</th>
      <th scope="col" style="width: 20%" class="text-center">Name</th>
      <th scope="col" style="width: 61%" class="text-center">Present</th>
      <th scope="col" style="width: 10%" class="text-center">Result</th>
    </tr>
  </thead>
  <tr>
    <td class="text-center">01</td>
    <td class="text-center">$title01</td>
    <td>$present01</td>
    <td scope="row" class="text-center">GOOD</td>
  </tr>
  <tr>
    <td class="text-center">02</td>
    <td...