Skip to content

Commit

Permalink
Bumped to 0.2.0 and minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rumourscape committed Dec 23, 2021
1 parent bbccc00 commit 0d48d34
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<h1>Cardsec</h1>
<h3>Security Assessment Tool for Cardano SPOs</h3>
<h5>Funded by Project Catalyst!</h5>
<h5>Thanks to Cardano Community</h5>
<br>
<p>
<h3> Prerequisites </h3>
Expand Down
10 changes: 5 additions & 5 deletions cardsec/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def banner():

def setup():
try:
subprocess.check_output(['cardano-node','version']).decode().split()[1]
subprocess.check_output(['cardano-node','version']).decode()
except:
print('Cardano Node not installed.')
print('Skipping setup...')
Expand Down Expand Up @@ -108,18 +108,18 @@ def system():
def info():
try:
node=subprocess.check_output(['cardano-node','version']).decode().split()[1]
except: node="Not found."
except: node="Not installed."

print(colored("\n-------System Info---------", "magenta"))

print("Distro: "+distro.id()+' '+distro.version())
print("RAM Size: " +str(psutil.virtual_memory()[0]/1024/1024//1024)+' GB')
print("Disk Size: " +str(psutil.disk_usage('/')[0]/1024/1024//1024)+'GB'+'\n')
print("Cardano-Node: " +node)
print("Cardano-Node: " + node)
latest = requests.get(
"https://api.github.com/repos/input-output-hk/cardano-node/releases/latest"
).json()["tag_name"]
if latest <= node:
if latest <= node and node != "Not installed.":
print(colored("Cardano-Node is up to date", "green"))
else:
print(colored(f"Cardano-Node {latest} update available ", "red"))
Expand Down Expand Up @@ -232,7 +232,7 @@ def installer():
print(colored("No existing version found...", "yellow"))
print(colored("Downloading Cardano-node...", "yellow"))
download = subprocess.Popen(
"wget https://hydra.iohk.io/job/Cardano/cardano-node/cardano-node-linux/latest-finished/download --output-document latest-node.tar.xf",
"sudo wget https://hydra.iohk.io/job/Cardano/cardano-node/cardano-node-linux/latest-finished/download --output-document latest-node.tar.xf",
shell = True,
cwd = path
)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cardsec"
version = "0.1.9"
version = "0.2.0"
description = "System and Security Assesment Tool for Cardano SPOs."
authors = [
"Advait Joglekar <[email protected]>",
Expand Down

0 comments on commit 0d48d34

Please sign in to comment.