2022年6月10日 星期五

OpenVAS on Ubuntu 20.04

# 更新系統

> sudo apt update

> sudo apt upgrade

> sudo apt dist-upgrade


# 抓取script

> wget https://raw.githubusercontent.com/yu210148/gvm_install/master/install_gvm.sh

> chmod +x install_gvm.sh


# 執行script

> sudo ./install_gvm.sh -v 21 -a -u

2021年7月22日 星期四

chatterbot 1.0.8 安裝紀錄

建立conda環境

> conda create --name chatterbot python=3.6

啟動環境

> conda activate chatterbot


安裝chatterbot及語料庫

> pip install chatterbot

> pip install chatterbot_corpus


安裝spacy

* 沒有安裝的話,執行範例的時候會出現錯誤

> pip install spacy==2.1.8

> python -m spacy download en


範例

from chatterbot import ChatBot

from chatterbot.trainers import ListTrainer

 

# Create a new chat bot named Charlie

chatbot = ChatBot('Charlie')

 

trainer = ListTrainer(chatbot)

 

trainer.train([

    "Hi, can I help you?",

    "Sure, I'd like to book a flight to Iceland.",

    "Your flight has been booked."

])

 

# Get a response to the input text 'I would like to book a flight.'

response = chatbot.get_response('I would like to book a flight.')

 

print(response)


參考網站:https://chatterbot.readthedocs.io/en/stable/examples.html

2020年11月12日 星期四

修正cisco switch ssh無法連線問題

指令

switch#conf t

switch#crypto key zeroize

switch#crypto key generate rsa general-keys modulus 2048

switch#end

switch#wr


連線時出現的錯誤訊息

Unable to negotiate with 192.168.0.1 port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1 


修改後的連線方式

ssh -o KexAlgorithms=+diffie-hellman-group1-sha1 -c aes256-cbc user@192.168.0.1

2020年10月26日 星期一

OpenVAS on CentOS 8

參考網站

https://www.libellux.com/openvas/#install-openvas-20-08-centos


 == 更新 CentOS ==

server@centos:~$ sudo yum -y update


== 關閉root可以登入ssh ==

server@centos:~$ sudo nano /etc/ssh/sshd_config

PermitRootLogin no

server@centos:~$ sudo systemctl restart sshd.service

server@centos:~$ sudo yum update

server@centos:~$ sudo nano /etc/ssh/sshd_config

PermitRootLogin no

server@centos:~$ sudo systemctl restart sshd.service

server@centos:~$ sudo yum update


== 查看SELinux狀態 ==

server@centos:~$ sudo sestatus

SELinux status:                 enabled


== 關閉SELinux ==

server@centos:~$ sudo setenforce 0

server@centos:~$ sudo nano /etc/selinux/config

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

#     enforcing - SELinux security policy is enforced.

#     permissive - SELinux prints warnings instead of enforcing.

#     disabled - No SELinux policy is loaded.

SELINUX=disabled

 

== 重新開機 ==

server@centos:~$ sudo shutdown -r now


== 再次確認SELinux狀態 ==

server@centos:~$ sudo sestatus

SELinux status:                 disabled


== 安裝 wget ==

server@centos:~$ sudo yum install wget


== download the Atomicorp installer ==

server@centos:~$ wget -q -O - https://updates.atomicorp.com/installers/atomic | sudo sh

For supported software packages please contact us at: 

  sales@atomicorp.com

Do you agree to these terms? (yes/no) [Default: yes] yes

Enable repo by default? (yes/no) [Default: yes]: yes


== Enable PowerTools and install extra packages ==

server@centos:~$ sudo yum config-manager --set-enabled PowerTools

server@centos:~$ sudo yum install epel-release


== 安裝 gvm ==

server@centos:~$ sudo yum install gvm


== 更新及設定admin密碼(這個跑很久) ==

server@centos:~$ sudo gvm-setup


== 進入網站 ==

https://127.0.0.1/

https://ipv4/

https://[ipv6]/

2020年10月6日 星期二

Chrome 啟動參數

路徑

"C:\Users\Duck\AppData\Local\Google\Chrome\Application\chrome.exe" 

"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"


參數
--proxy-server=myproxy:3128設定proxy
--incognito無痕模式
--kiosk啟動時全螢幕(F11無效)
--disable-pinch禁止兩指縮放螢幕
--overscroll-history-navigation=0禁止螢幕滑動
--disable-javascript禁止javascript
--disable-ipv6禁止ipv6
--disable-desktop-notifications禁止提示
--disable-audio禁止audio