├── .github ├── dependabot.yml └── workflows │ ├── antivirus.scan.yml │ ├── codacy.yml │ ├── devskim.yml │ └── vulnerability-check-diskcheck.monster.yml ├── LICENSE.md ├── PRIVACY.md ├── README.md ├── SECURITY.md ├── smart-test.sh ├── smart.sh ├── smartmontools-build └── README.md ├── verify-and-run.sh ├── verify-and-run.sh-how.it.works └── windows └── README.md /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "github-actions" # See documentation for possible values 9 | directory: "/" # Location of package manifests 10 | schedule: 11 | interval: "daily" 12 | -------------------------------------------------------------------------------- /.github/workflows/antivirus.scan.yml: -------------------------------------------------------------------------------- 1 | name: Git AntiVirus Scan 2 | 3 | on: [push] 4 | 5 | jobs: 6 | gitavscan: 7 | runs-on: ubuntu-latest 8 | name: AV scan 9 | steps: 10 | - uses: actions/checkout@v4 11 | - name: Git AntiVirus Scan 12 | uses: djdefi/gitavscan@main 13 | -------------------------------------------------------------------------------- /.github/workflows/codacy.yml: -------------------------------------------------------------------------------- 1 | # This workflow uses actions that are not certified by GitHub. 2 | # They are provided by a third-party and are governed by 3 | # separate terms of service, privacy policy, and support 4 | # documentation. 5 | 6 | # This workflow checks out code, performs a Codacy security scan 7 | # and integrates the results with the 8 | # GitHub Advanced Security code scanning feature. For more information on 9 | # the Codacy security scan action usage and parameters, see 10 | # https://github.com/codacy/codacy-analysis-cli-action. 11 | # For more information on Codacy Analysis CLI in general, see 12 | # https://github.com/codacy/codacy-analysis-cli. 13 | 14 | name: Security Scan 15 | 16 | on: 17 | push: 18 | branches: [ "main" ] 19 | pull_request: 20 | # The branches below must be a subset of the branches above 21 | branches: [ "main" ] 22 | schedule: 23 | - cron: '0 * * * *' 24 | 25 | permissions: 26 | contents: read 27 | 28 | jobs: 29 | codacy-security-scan: 30 | permissions: 31 | contents: read # for actions/checkout to fetch code 32 | security-events: write # for github/codeql-action/upload-sarif to upload SARIF results 33 | name: Codacy Security Scan 34 | runs-on: ubuntu-latest 35 | steps: 36 | # Checkout the repository to the GitHub Actions runner 37 | - name: Checkout code 38 | uses: actions/checkout@v4 39 | 40 | # Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis 41 | - name: Run Codacy Analysis CLI 42 | uses: codacy/codacy-analysis-cli-action@5cc54a75f9ad88159bb54046196d920e40e367a5 43 | with: 44 | # Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository 45 | # You can also omit the token and run the tools that support default configurations 46 | project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} 47 | verbose: true 48 | output: results.sarif 49 | format: sarif 50 | # Adjust severity of non-security issues 51 | gh-code-scanning-compat: true 52 | # Force 0 exit code to allow SARIF file generation 53 | # This will handover control about PR rejection to the GitHub side 54 | max-allowed-issues: 2147483647 55 | 56 | # Upload the SARIF file generated in the previous step 57 | - name: Upload SARIF results file 58 | uses: github/codeql-action/upload-sarif@v2 59 | with: 60 | sarif_file: results.sarif 61 | -------------------------------------------------------------------------------- /.github/workflows/devskim.yml: -------------------------------------------------------------------------------- 1 | # This workflow uses actions that are not certified by GitHub. 2 | # They are provided by a third-party and are governed by 3 | # separate terms of service, privacy policy, and support 4 | # documentation. 5 | 6 | name: DevSkim 7 | 8 | on: 9 | push: 10 | branches: [ "main" ] 11 | pull_request: 12 | branches: [ "main" ] 13 | schedule: 14 | - cron: '0 * * * *' 15 | 16 | jobs: 17 | lint: 18 | name: DevSkim 19 | runs-on: ubuntu-20.04 20 | permissions: 21 | actions: read 22 | contents: read 23 | security-events: write 24 | steps: 25 | - name: Checkout code 26 | uses: actions/checkout@v4 27 | 28 | - name: Run DevSkim scanner 29 | uses: microsoft/DevSkim-Action@v1 30 | 31 | - name: Upload DevSkim scan results to GitHub Security tab 32 | uses: github/codeql-action/upload-sarif@v2 33 | with: 34 | sarif_file: devskim-results.sarif 35 | -------------------------------------------------------------------------------- /.github/workflows/vulnerability-check-diskcheck.monster.yml: -------------------------------------------------------------------------------- 1 | name: Test diskcheck.monster for publicly known js vulnerabilities 2 | 3 | on: push 4 | jobs: 5 | security: 6 | runs-on: ubuntu-latest 7 | steps: 8 | - name: Test for public javascript library vulnerabilities 9 | uses: lirantal/is-website-vulnerable@main 10 | with: 11 | scan-url: "https://diskcheck.monster" 12 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2 | 3 | Everyone is permitted to copy and distribute verbatim or modified 4 | copies of this license document, and changing it is allowed as long 5 | as the name is changed. 6 | 7 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 8 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 9 | 10 | 0. You just DO WHAT THE FUCK YOU WANT TO. 11 | -------------------------------------------------------------------------------- /PRIVACY.md: -------------------------------------------------------------------------------- 1 | # 🛡️ Privacy Policy 2 | 3 | ## 💥 What exactly do you do with my info, anyway? 4 | We understand the importance of protecting the privacy and we protect it. We only log/store/collect the s.m.a.r.t data you send to us. 5 | 6 | ## 💥 Privacy Policy 7 | When you send the s.m.a.r.t via our api, we need to collect and store the following information: 8 | - s.m.a.r.t data that you send to our api 9 | 10 | ## 💥 What we do NOT log/store/collect: 11 | - IP address 12 | - Web log 13 | - s.m.a.r.t disk serial number 14 | 15 | ## 💥 Right To Be Forgotten 16 | We believe in your right to be forgotten. If you want your s.m.a.r.t data to be removed and forgotten just create GitHub issue. 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 🛸 NVMe / 🚀 SSD / 🖴 HDD S.M.A.R.T Monitoring. 2 | 3 | [![Git AntiVirus Scan](https://github.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring/actions/workflows/antivirus.scan.yml/badge.svg?branch=main)](https://github.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring/actions/workflows/antivirus.scan.yml) 4 | [![Security Scan](https://github.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring/actions/workflows/codacy.yml/badge.svg?branch=main)](https://github.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring/actions/workflows/codacy.yml) 5 | [![DevSkim](https://github.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring/actions/workflows/devskim.yml/badge.svg)](https://github.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring/actions/workflows/devskim.yml) 6 | [![Test diskcheck.monster for publicly known js vulnerabilities](https://github.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring/actions/workflows/vulnerability-check-diskcheck.monster.yml/badge.svg)](https://github.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring/actions/workflows/vulnerability-check-diskcheck.monster.yml) 7 | 8 | ``` 9 | VirusTotal checked: 10 | ☣️ Site and scripts: without malware code! 11 | ☢️ Site and scripts: without virus code! 12 | ✅ 100 % Clean source code! 13 | ``` 14 | 15 | ***❓ How to use the scripts?*** 16 | ``` 17 | Ubuntu/Debian/CentOS: 18 | wget -qO- https://diskcheck.monster/smart.sh | sh 19 | or 20 | wget -qO- https://raw.githubusercontent.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring/main/smart.sh | sh 21 | or 22 | wget -qO- https://diskcheck.monster/verify-and-run.sh | sh 23 | or 24 | wget -qO- https://raw.githubusercontent.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring/main/verify-and-run.sh | sh 25 | 26 | Windows: 27 | https://github.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring/tree/main/windows 28 | ``` 29 | 30 | ***❓ Why to use our tool?*** 31 | ``` 32 | Because: 33 | - You can share with others the disk info 34 | - You can show how much hours has been the disk run without any errors 35 | - You can show other when the disk is failing 36 | - You can show temperature chart 37 | - You also will have complete and original (without the serial number) s.m.a.r.t history of your disk(s) when sending s.m.a.r.t data to our api 38 | - Our script also checks the disks in hardware raid, which normally smartctl without scripting it first won´t do 39 | - And also you can get it working on windows, with the same things as above 40 | - You contribute to our little community of disk fans who love s.m.a.r.t data, who love disks, who love to code things 41 | 42 | And finally and not lastly: 43 | - We are active coders 44 | - Right now this is new addition: "Battle page for Power on hours": https://diskcheck.monster/battle-power_on_hours 45 | ``` 46 | 47 | ***❓ What are the requirements to run the scripts?*** 48 | ``` 49 | Ubuntu/Debian/CentOS: 50 | - Curl 51 | - SmartMonTools (smartctl) 52 | - Wget (verify-and-run.sh) 53 | 54 | Windows: 55 | - Curl 56 | - SmartMonTools (smartctl) 57 | ``` 58 | 59 | ***❤️ Thanks goes to:*** 60 | |👨👩 Who|❓ Why| 61 | |---|--:| 62 | @Zappie at https://lowendtalk.com/profile/Zappie| Pointing out and helping out with megaraid and serveraid hardware raid test. 63 | @Everyone| Everyone who tests the scripts and site. 64 | 65 | ***❓ Why disk.lol domain name and extension?*** 66 | Well it was simple for us. The domain name is short. The domain name was relative cheap. The domain name has domain info privacy. 67 | 68 | ***❓ Does it works?*** 69 | |🖴 Type of disk or raid|❓ Generate S.M.A.R.T data|❓ Send to api|❓ Temperature Chart|❓ Hidden Serial Number|❓ Serial Number sent over api 70 | |---|---|---|---|---|--:| 71 | HDD|✅|✅|✅|✅|❌ 72 | SSD|✅|✅|✅|✅|❌ 73 | NVMe|✅|✅|✅|✅|❌ 74 | MegaRaid|✅|✅|✅|✅|❌ 75 | ServeRAID|✅|✅|✅|✅|❌ 76 | 77 | ***✅ Check the script hashes:*** 78 | ``` 79 | wget -qO- https://diskcheck.monster/smart.sh | md5sum | awk '{print $1}' 80 | wget -qO- https://diskcheck.monster/smart-test.sh | md5sum | awk '{print $1}' 81 | wget -qO- https://diskcheck.monster/verify-and-run.sh | md5sum | awk '{print $1}' 82 | ``` 83 | 84 | |⚙️ Script|#️⃣ Hash| 85 | |---|--:| 86 | smart.sh|d300e269f1c9b6df241ac14d3d5e9954 87 | smart-test.sh|6bc155992975d2a50046d0ad2cb6b7c4 88 | verify-and-run.sh|f8e4f9d308312658016a3d5ad4dc1c34 89 | 90 | 91 | ***✅ Virus check:*** 92 | 100 % Clean source code - "No security vendors flagged this URL as malicious" 93 | 94 | |⚙️ Script or Site|📄 Url to verify| 95 | |---|--:| 96 | diskcheck.monster|https://www.virustotal.com/gui/url/84d9caef363d9b494ced0ad8f99f86ff34db7dac75488b86d0e30ca65ca29d49 97 | diskcheck.monster/smart.sh|https://www.virustotal.com/gui/url/56ec5548a94245caded3c62b797ca1f05c174eea71a4b924ced7c0c4e1054c8a 98 | diskcheck.monster/smart-test.sh|https://www.virustotal.com/gui/url/3d8b4a8e8b869d33a2d28d4b6063dad16c0d546edfdea5bdbbcbdfb19ad91f3e 99 | diskcheck.monster/verify-and-run.sh|https://www.virustotal.com/gui/url/986fb1ea6915e6fd5b1cad0b940f65517d491f5d52d5176ceb63862fc6486fd7 100 | github raw smart.sh|https://www.virustotal.com/gui/url/e1b74e82688c8190e9192c4699cbe6b9cc23c16b35fa49579918b0129ed82e75 101 | github raw smart-test.sh|https://www.virustotal.com/gui/url/f6110301df8cd009d04392e0a6aa04cce32857c8e8a51d5e851c10a029b08027 102 | github raw verify-and-run.sh|https://www.virustotal.com/gui/url/be6524676e2e8251f74db150e371b9db3d87a708fd7692eb715a221f5246eb5f 103 | github raw smartmontools-build.sh|https://www.virustotal.com/gui/url/b02087dd0d013367af80df24e4abc349deafbc25e8b9385f55e7d8ee54316124 104 | github raw README.md| https://www.virustotal.com/gui/url/62ae953bfb4c531fdcb7d268369ac610ade6a46209b84c153a54877dc18d018c 105 | github raw windows README.md|https://www.virustotal.com/gui/url/11097db574e0716a6df2dea9434b4ba0834a961d72864cb8b769b92ba7a75318 106 | 107 | ***🛸 Optimized page speed:*** 108 | |⚙️ Service|📄 Url to test|🌍 Tested from|🚀 Speed 109 | |---|---|---|--:| 110 | Pingdom|https://tools.pingdom.com/#604f5f0edd400000|DE|435ms 111 | GTmetrix|https://gtmetrix.com/reports/disk.lol/csVVp3H5/|UK|194ms 112 | PageSpeed|https://pagespeed.web.dev/report?url=https%3A%2F%2Fdisk.lol%2F&form_factor=desktop|?|200ms 113 | 114 | ***⛔ Is your site disk.lol blacklisted?*** 115 | |⚙️ Service|📄 Url to test|❓ Blacklisted|❓ 100% Clean - NOT Blacklisted 116 | |---|---|---|--:| 117 | MultiRBL|https://multirbl.valli.org/lookup/diskcheck.monster.html|❌|✅ 118 | SpamHaus|https://check.spamhaus.org/not_listed/?searchterm=diskcheck.monster|❌|✅ 119 | MXToolBox|https://mxtoolbox.com/SuperTool.aspx?action=blacklist%3adiskcheck.monster&run=toolpage|❌|✅ 120 | 121 | ***💾 Archived scripts and sites:*** 122 | |⚙️ Service|📄 Url|⚙️ Script or Site 123 | |---|---|--:| 124 | WayBack Machine|[https://web.archive.org/web/*/https://diskcheck.monster/](https://web.archive.org/web/*/https://disk.lol/)|disk.lol 125 | WayBack Machine|[https://web.archive.org/web/*/https://diskcheck.monster/smart.sh](https://web.archive.org/web/*/https://disk.lol/smart.sh)|disk.lol/smart.sh 126 | WayBack Machine|[https://web.archive.org/web/*/https://diskcheck.monster/smart-test.sh](https://web.archive.org/web/*/https://disk.lol/smart-test.sh)|disk.lol/smart-test.sh 127 | WayBack Machine|[https://web.archive.org/web/*/https://diskcheck.monster/verify-and-run.sh](https://web.archive.org/web/*/https://disk.lol/verify-and-run.sh)|disk.lol/verify-and-run.sh 128 | Archive.Today|https://archive.ph/diskcheck.monster|diskcheck.monster 129 | Archive.Today|https://archive.ph/Cgkgz|diskcheck.monster/smart.sh 130 | Archive.Today|https://archive.ph/TP1hl|diskcheck.monster/smart-test.sh 131 | Archive.Today|https://archive.ph/sRiMW|diskcheck.monster/verify-and-run.sh 132 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # 🛡️ Security Policy 2 | 3 | ## 💥 Supported Scripts 4 | 5 | Which scripts of your project are currently being supported with security updates and development? 6 | 7 | | ⚙️ Script | ❓ Supported? | 8 | | ------- | ------------------ | 9 | | smart.sh | :white_check_mark: | 10 | | smart-test.sh | :white_check_mark: | 11 | | verify-and-run.sh | :white_check_mark: | 12 | 13 | ## 🔗 Owned domains 14 | 15 | Which domain names do you currently own? 16 | 17 | | 🌍 Domain | ❓ Own? | 18 | | ------- | ------------------ | 19 | | diskcheck.monster | :white_check_mark: | 20 | 21 | ## ⚠️ Is your code and site clean without viruses and malwares? 22 | ``` 23 | VirusTotal checked: 24 | ☣️ Site and scripts: without malware code! 25 | ☢️ Site and scripts: without virus code! 26 | ✅ 100 % Clean source code! 27 | ``` 28 | 29 | ## 🛸 More security please? 30 | 31 | Yes sure why not. We also run GitHub actions for Git AntiVirus Scan, Security Scan, DevSkim, JS vulnerability test on disk.lol and diskcheck.co 32 | 33 | [![Git AntiVirus Scan](https://github.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring/actions/workflows/antivirus.scan.yml/badge.svg?branch=main)](https://github.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring/actions/workflows/antivirus.scan.yml) 34 | [![Security Scan](https://github.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring/actions/workflows/codacy.yml/badge.svg?branch=main)](https://github.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring/actions/workflows/codacy.yml) 35 | [![DevSkim](https://github.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring/actions/workflows/devskim.yml/badge.svg)](https://github.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring/actions/workflows/devskim.yml) 36 | [![Test diskcheck.monster for publicly known js vulnerabilities](https://github.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring/actions/workflows/vulnerability-check-diskcheck.monster.yml/badge.svg)](https://github.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring/actions/workflows/vulnerability-check-diskcheck.monster.yml) 37 | [![Test diskcheck.monster for publicly known js vulnerabilities](https://github.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring/actions/workflows/vulnerability-check-diskcheck.monster.yml/badge.svg)](https://github.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring/actions/workflows/vulnerability-check-diskcheck.monster.yml) 38 | -------------------------------------------------------------------------------- /smart-test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | for disk in $(smartctl --scan|cut -d ' ' -f1) ; do 3 | echo "Starting S.M.A.R.T short test for disk: " $disk 4 | smartctl -t short $disk 5 | done 6 | -------------------------------------------------------------------------------- /smart.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -e "/usr/bin/curl" ] || [ ! -e "/usr/sbin/smartctl" ]; then 4 | echo "[#ERROR] To run the S.M.A.R.T for your disk you will need to install smartmontool." 5 | echo "[#ERROR] To send the S.M.A.R.T data to our api you will need to install curl." 6 | echo "[#INFO] Exiting script now." 7 | exit 8 | fi 9 | 10 | for disk in $(smartctl --scan|cut -d ' ' -f1) ; do 11 | smart=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 10 | head -n 1) 12 | smartctl -a $disk -v 1,raw24/raw32 -v 7,raw24/raw32 > $smart 13 | serialnumber=$(cat $smart | grep "Serial" | head -n 1 | awk '{print $3}') 14 | sed -i "s/$serialnumber/Hidden/g" $smart 15 | if egrep "ServeRAID|MegaRaid" $smart 16 | then 17 | smartctl --scan|cut -d '#' -f1|cut -d "," -f2| cut -d " " -f1 > megaraid.txt 18 | for N in $(cat megaraid.txt) ; do 19 | echo "Generating S.M.A.R.T for disk (MegaRaid): " $disk,$N 20 | smartctl -a -v 1,raw24/raw32 -v 7,raw24/raw32 -d megaraid,$N $disk > $smart 21 | serialnumber=$(cat $smart | grep "Serial" | head -n 1 | awk '{print $3}') 22 | sed -i "s/$serialnumber/Hidden/g" $smart 23 | curl -F smart=@$smart https://diskcheck.monster/api?disk=$disk.$N 24 | rm $smart 25 | done 26 | rm megaraid.txt 27 | else 28 | echo "Generating S.M.A.R.T for disk: " $disk 29 | curl -F smart=@$smart https://diskcheck.monster/api?disk=$disk 30 | fi 31 | rm $smart 32 | done 33 | -------------------------------------------------------------------------------- /smartmontools-build/README.md: -------------------------------------------------------------------------------- 1 | ⚙️ You can build smartmontools (smartctl) from source by running these commands: 2 | 3 | ``` 4 | apt-get -y install automake 5 | git clone https://github.com/smartmontools/smartmontools.git 6 | cd smartmontools/smartmontools 7 | ./autogen.sh 8 | ./configure --with-nvme-devicescan 9 | make 10 | sudo make install 11 | ``` 12 | 13 | ❓ How to verify smartctl is installed? 14 | 15 | ``` 16 | ➡️ Run command: 17 | which smartctl 18 | 19 | 💡 Output: 20 | /usr/local/sbin/smartctl 21 | 22 | ➡️ Run command: 23 | /usr/local/sbin/smartctl -v 24 | or 25 | smartctl -v 26 | 27 | 💡 Output: 28 | smartctl pre-7.4 (build date Jun 9 2022) [x86_64-linux-5.4.0-81-generic] (local build) 29 | ``` 30 | 31 | ✅ Done :) 32 | -------------------------------------------------------------------------------- /verify-and-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | hash="d300e269f1c9b6df241ac14d3d5e9954" 3 | disk="wget -qO- https://diskcheck.monster/" 4 | hash_github="d300e269f1c9b6df241ac14d3d5e9954" 5 | disk_github="wget -qO- https://raw.githubusercontent.com/0xDiSk/NVMe-SSD-HDD-S.M.A.R.T-Monitoring/main/README.md" 6 | 7 | if [ ! -e "/usr/bin/wget" ]; then 8 | echo "[#ERROR] To verify the script hashes you will need to install wget." 9 | echo "[#INFO] Exiting script now." 10 | exit 11 | fi 12 | 13 | if test -z "$($disk | grep -h $hash)" || test -z "$($disk_github | grep -h $hash_github)"; then 14 | echo "Error: Verification of script failed - update your script." 15 | echo "Please download manually smart.sh script - https://diskcheck.monster/smart.sh" 16 | else 17 | echo "Verification of script was successful." 18 | if [ -f "smart.sh" ]; then 19 | echo "Now will run script smart.sh" 20 | sh smart.sh 21 | else 22 | echo "Error: script smart.sh missing." 23 | echo "Please download manually smart.sh script (file must be named as smart.sh) - https://diskcheck.monster/smart.sh" 24 | fi 25 | fi 26 | -------------------------------------------------------------------------------- /verify-and-run.sh-how.it.works: -------------------------------------------------------------------------------- 1 | verify-and-run.sh 2 | | 3 | |--> Check if wget is installed 4 | | | 5 | | |--> Yes - continue 6 | | |--> No - automatically install wget and continue 7 | | 8 | |--> Check & Verify & Run smart.sh script 9 | | 10 | |-|--> If the hash of script.sh is the same as defined in script verify-and-run.sh 11 | |-|--> If the hashes on diskcheck.monster and github.com sites are the same as defined in script verify-and-run.sh 12 | | | 13 | | |--> Verification of script was successful 14 | | | 15 | | |--> Check if script smart.sh exists 16 | | | 17 | | |--> Yes 18 | | | | 19 | | | |--> Now will run script smart.sh (sh smart.sh) 20 | | | 21 | | |--> No 22 | | | 23 | | |--> Error: script smart.sh missing. 24 | | Please download manually smart.sh script (file must be named as smart.sh) - https://diskcheck.monster/smart.sh 25 | | 26 | | 27 | |--> Verification of script failed 28 | | 29 | | --> Error: Verification of script failed - update your script. 30 | Please download manually smart.sh script - https://diskcheck.monster/smart.sh 31 | -------------------------------------------------------------------------------- /windows/README.md: -------------------------------------------------------------------------------- 1 | 💾 Download curl for windows: 2 | ``` 3 | https://curl.se/windows/ 4 | ``` 5 | 6 | 💾 Download smartmontools (smartctl) for windows: 7 | ``` 8 | https://builds.smartmontools.org/ (smartmontools-win32-setup-*.exe) 9 | ``` 10 | 11 | ⚙️ Install smartmontools 12 | ``` 13 | Copy c:\Program Files\smartmontools\bin\smartctl.exe to some new location, in our case it was x:\smart\ 14 | ``` 15 | 16 | 💡 Example of paths: 17 | ``` 18 | Main path => x:\smart\ 19 | Curl path => x:\smart\curl\bin\curl.exe 20 | Smartctl path => x:\smart\smartctl.exe 21 | Smartctl script path => x:\smart\smart.bat 22 | Curl script path => x:\smart\curl.bat 23 | ``` 24 | 25 | 💡 Before you start creating scripts change /dev/sda according to your disk: 26 | ``` 27 | - Output is written to sda.txt file. 28 | - smartctl.exe will generate S.M.A.R.T data for /dev/sda disk 29 | ``` 30 | 31 | 📝 Create script smart.bat: 32 | ``` 33 | %CD%\smartctl.exe -a /dev/sda > x:\smart\sda.txt 34 | ``` 35 | 36 | 📝 Create script curl.bat: 37 | ``` 38 | %CD%\curl\bin\curl.exe -F smart=@sda.txt "https://diskcheck.monster/api?disk=/dev/sda/" 39 | pause 40 | ``` 41 | 42 | ➡️ Run scripts: 43 | ``` 44 | smart.bat 45 | curl.bat 46 | ``` 47 | --------------------------------------------------------------------------------