block SSH attacks on Linux with denyhosts (centOS7)

How To Install and Configure DenyHosts in CentOS 7 for preventing the violent cracking on ssh 防止ssh被暴力破解:denyhost工具 DenyHosts is an open-source python-based tool developed by Phil Schwartz intended to prevent brute-force attacks and dictionary-based attacks on SSH servers. It is a log-based security tool. It is simple and the ability to configure rules manually. DenyHosts is widely used as an alternative to Fail2ban. If there have been too many invalid SSH login attempts it assume that it’s brute-force attacks or dictionary-based attacks and prevents the IP address from making any further attempts by adding it to /etc/hosts.

READ MORE

ASCII Camera

https://andrei.codes/ ASCII Camera Transforms your webcam stream into a real-time ASCII representation using WebRTC APIs. Requires webcam and WebRTC enabled browser. Predator Vision Transforms your webcam stream into a real-time movement-triggered heatmap representation. Requires webcam and WebRTC enabled browser. ........................................ . .....,/((#####%#%%##((/*,,*////((/////*,.................. .... ..... ............... ............................................,*(###(##%%#######%%%#%#####%###%%%%%#%%###(//***,.......... ... ..... ............... ....................................... .*(###%&%%%%%%%%%%%&%&%%&%%%%&%%%&%%%&%%%%%%%%%%%%&&%%%#(/,..,..... ........... ............... .....................................,/##%%%%%%%%%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&%%%&%%%&&%%%%%%%%%%%((*,,***..... . .................................,/#%%%%&%%&&&&&&&&&&&&&&@@@@@@@@&@@@@&&&&&&&&&&%&&&%%%%%%%&%%%%%%%%%%%%#/,**,... ...................... ....,,/#%%%%%&&&&&%&&&&&&&&&&&&@@@@@@@&&@&&@@&&&&&&&&&&&&&&&&&&%%%%%%%%%%%%%%%%%%###/*,.. .. ............................,/%%%%&&%%%&&&&&&&&&&&&&&&&&&&@&&&&&&&&&&@&&&@@&&&&@@&&&&@&&&&&&&&&%%%%%%%%%&&%%%##(*. ................ ........./##%%&%%&&&&&&&@@@@@@&@@@@&&&&&&&&&&&&&&&&%&&&%&&&&&&&&&&&&&&&&&&&&&%%&%%&&&&%%%%&%###(*,... .......................,/###%%&&@@&&&@&&&&&&&&&&&&&&&&&&%&&&&&&&&&&&&&&&&&&&&&&&&%&&&&&&&&&&&%%%%&&&&&%%&&&%%%%%#(*,.. .....................,./##%%&&&&&@&&&&&&&&&&&&&&&&&&%%%&&&&&&&&&&&&&&&&&&&&&&&&&&%&&&&&&&&&&&&&&&&&&&&&&&&&%%%&%%%(*,.. ....................,/(#%%%&&&&&&&@@&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%%%%%%%%%%%%%%%%%%%%%%%%%&&&&&&&&&&&&&&&&%%&&&&&%(*,.. ...................,/(#%%%&&&&&&&@@@@&&&&&&&&&&&%%&%%%%%%#############################%%%%%%%%%%&&&&&&&&&&&&&&&&&%%(*, ...................*(%%%&&&&&&&@@@@&%%&&&&%%%%###(((((//((///////////////////////////((((####%%%%%%%&&&&&&&&&&&&&&&%#*.. ..................,(#%%&&&&&@&@@&&&&&%%%%%##((((/////////////////************//////////////(((((####%%&&&&&&&&&&&&%%%%*. ..................*#%%&&&&&&&&&&&&&%%%%##((((////////////////*******************///////////////////((#%%%&&&&&&%%&&&%%%/. . . .................*#%&&&&&&&@&&&&&&%%##((((//////////////*****************************////////////////((#%%%&&&&&&%%%%%%&(, ................,#%&&&&&&&&&&&&&&%##(((((/////////////**********************************///////////////((%%%&&&&&&&%&&%%%(.. ...............,((%%&&&&&&&&&&&&%##(((((/////////////***********************************////////////////(#%%%%&&&&&&&&&%%(. ............. .,/#%&&&&&&%%&&&%%#(((((/(/////////////************************************///////////////((#%%%%%&&&%&%%%%(. ................,(%%&&&&%%&&&%%##((((((((////////////***********************************////////////////((##%%%%%&&%%%%%%(. . ................,(#&&&&%&&&&&%%#(((((((//////////////*************************************///////////////((#%%%&&%%&&&&%#*. . .

READ MORE

Mac OSX Catalina: can’t be opened because Apple cannot check for malicious software

Mac OSX Catalina: can’t be opened because Apple cannot check for malicious software macOS cannot verify that this app is free from malware. Solution: check with Security&Privacy settings under System Preferences to lift the Gatekeeper blocks, and fix alert messages. when you are using Catalina, the warning message reappears every time you open the non-notarized app open Terminal and run the cmd below xattr -d com.apple.quarantine /Applications/<your App's Name>.app e.g.: xattr -d com.apple.quarantine /Applications/qbittorrent.app

READ MORE

手机—— “精神糖(Psycho Candy)”

手机—— “精神糖(Psycho Candy)” 糖吃多了会对身体有很多害处,但糖却对味觉有强大的吸引力。 手机,越来越超越它本该承载的通讯功能,太多的信息、app和精心设计的用户操作体验,给人的精神带来愉悦与嗜欲。 你在睡前是否会玩会手机,感觉像是吸口大烟,吸了就舒服了。 你在起床前是否会刷一会新闻或朋友圈?不刷感觉心理有缺失感。 这种现象需引起重视,一不小心就会让本该过得更有效的时光从指间悄悄流逝,更别提眼镜和颈椎上带来的伤害。 你会发现那些信息、动态刷过之后,对生活没有任何益处,生命被浪费,换来的是精神的嗜手机欲得以满足而已。 不要让手机进入卧室,会减轻这一“精神糖果”对人生的妨害。

READ MORE

Linux 网络、Daemon、systemd 相关命令

=== CentOS 7+ 网络、Daemon 相关命令 === 包含了centos system 中 firewalld, port occupation, systemd service management 相关常用命令。 1. firewalld `firewall-cmd --permanent --add-port=100/tcp ` # open specific port `firewall-cmd --permanent --add-port=200-300/tcp` `firewall-cmd --permanent --add-service=http` # open port for service `firewall-cmd --reload` # take changes into effect `firewall-cmd --list-ports` # check the ports opened. `firewall-cmd --list-services` # check the service ` iptables-save` # check all currently applied rules 2. port netstat -tlunp # display all ports opened in host lsof -i # list the network open ports netstat -lptu # the process that owns them netstat -tulpn # You can add " | grep "kw1\|kw2\|kw3' " for keywords grep 3.

READ MORE

Linux or Mac, List of the Port occupation

Mac, List of the Port occupation lsof -iTCP -sTCP:LISTEN -n -P Usage of lsof command, for the port management | | 10 lsof Command Examples in Linux: lsof meaning ‘LiSt Open Files’ is used to find out which files are open by which process. One of the reason to use lsof command is when a disk cannot be unmounted as it says the files are being used. Or some port is occupied. 1. List all Open Files with lsof Command In the below example, it will show long listing of open files some of them are extracted for better understanding which displays the columns like Command, PID, USER, FD, TYPE etc.

READ MORE

concatenate of numpy

You may first use np.concatenate >>> a = np.array([[1, 2], [3, 4]]) >>> b = np.array([[5, 6]]) >>> np.concatenate((a, b), axis=0) array([[1, 2], [3, 4], [5, 6]]) >>> np.concatenate((a, b.T), axis=1) array([[1, 2, 5], [3, 4, 6]]) >>> np.concatenate((a, b), axis=None) array([1, 2, 3, 4, 5, 6]) Don’t forget np.append: np.append is usually used for concatenating vectors: Examples >>> >>> np.append([1, 2, 3], [[4, 5, 6], [7, 8, 9]]) array([1, 2, 3, ..., 7, 8, 9]) When axis is specified, values must have the correct shape.

READ MORE

Configure ssl+Nginx (secure socket.io connection)

secure the nodejs app transmissions by ssl For quick reference: Deploy simple_socket_chat on fresh VPS, jump to buttom of this article 1. make a simplest socket.io app ref: https://socket.io/get-started/chat/ basic nodejs app: use the Node.JS web framework express to html as client end. create a package.json manifest file that describes our project npm install express@4.15.2 create an index.js file that will setup our application The index.js file supply the html content of “Hello world”. create a index.html file and modify the index.

READ MORE

nginxBasic: Set up server blocks on CentOS 7

Set Up Nginx Server Blocks on CentOS 7 NginxCentOS By Josh Barnett Published on November 5, 2014 Introduction Nginx uses server blocks to manage configurations. Server blocks allow one server to host multiple domains or interfaces. How to serve different content to different visitors depending on which domains they are requesting: Prerequisites access to centos7 server, has sudo privileges. Nginx installed. Before you begin with this guide, there are a few steps that need to be completed first. You will need access to a CentOS 7 server with a non-root user that has sudo privileges.

READ MORE