hw-1

raspberry add kali repo ,import kali repo publick key

import kali repo publick key

1
2
3
4
5
6
7
8
sudo apt install dirmngr
gpg --keyserver pgpkeys.mit.edu --recv-key ED444FF07D8D0BF6
gpg -a --export ED444FF07D8D0BF6 | sudo apt-key add -

gpg --keyserver hkp://keys.gnupg.net --recv-key 7D8D0BF6
gpg -a --export 7D8D0BF6 | sudo apt-key add -

#https://docs.kali.org/introduction/download-official-kali-linux-images

raspberry add kali repo

1
2
3
4
5
6
7
sudo vi /etc/apt/sources.list.d/kali.list
deb http://http.kali.org/kali kali-rolling main contrib non-free
# For source package access, uncomment the following line
# deb-src http://http.kali.org/kali kali-rolling main contrib non-free
#https://www.kali.org/news/kali-linux-metapackages/
#https://docs.kali.org/general-use/kali-linux-sources-list-repositories
#https://www.raspberrypi.org/forums/viewtopic.php?f=41&t=107001

how to enable ssh keepalive ,socat keep alive

how to enable ssh keepalive ,socat keep alive

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# ssh enable keepalive
# via config
sudo vim /etc/ssh/sshd_config
...
ClientAliveInterval 30
TCPKeepAlive yes
ClientAliveCountMax 2
#via command opt
ssh -o ServerAliveInterval=60 myname@myhost.com

#restart sshd
sudo service sshd restart

#socat TCPKeepAlive
socat TCP-LISTEN:8000,reuseaddr,fork,keepalive,keepidle=10,keepintvl=30,keepcnt=2 TCP:127.0.0.1:80

how to install x11 desktop and enable vnc server on raspberry lite

how to install x11 desktop and enable vnc server on raspberry lite

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<br />#install X11 Desktop
sudo apt-get install cups
sudo apt install xrdp
sudo apt-get install --no-install-recommends xserver-xorg
sudo apt-get install --no-install-recommends xinit
sudo apt-get install raspberrypi-ui-mods
sudo apt-get install lightdm
sudo reboot

#install VNC
sudo apt-get update
sudo apt-get install realvnc-vnc-server
sudo apt-get install realvnc-vnc-viewer


# Enable VNC
Alternatively, run the command sudo raspi-config, navigate to Interfacing Options > VNC and select Yes.

#resize GPU Memory
run sudo raspi-config, navigate to Advanced options > Memory Split, and ensure your GPU has at least 128MB.

OSError: [Errno 1] Operation not permitted: ‘/tmp/pip-l_eBpW-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy-1.8.0rc1-py2.7.egg-info’

OSError: [Errno 1] Operation not permitted: ‘/tmp/pip-l_eBpW-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy-1.8.0rc1-py2.7.egg-info’

1
2
#osx pip install scikit-image  skip update numpy
sudo pip install --ignore-installed six scikit-image

error: could not create ‘/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/greenlet’: Operation not permitted

1
sudo pip install --user scikit-image

This copy of the Install OS X Yosemite application can’t be verified. It may have been corrupted or tampered with during downloading

This copy of the Install OS X Yosemite application can’t be verified. It may have been corrupted or tampered with during downloading

installation file for Yosemite has had its digital certificate expire. Which means after a certain date it will no longer work. To work around this issue you open the Date & Time preferences pane, uncheck the box for “Set date & time automatically” & set the date back to just after the time Yosemite was initially released (October 16, 2014) then run the installer.

In the installation menu, choose Utilities / Terminal and type

1
date    1020170014 

then quit Terminal and the installer works.

install webdav on raspberry pi

install webdav on raspberry pi

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
sudo apt-get  install  -y apache2 vim
sudo a2enmod dav
sudo a2enmod dav_fs
sudo mkdir -p /var/www/webdav

sudo vim /etc/apache2/sites-available/000-default.conf

Alias /webdav /var/www/webdav

<Location /webdav>
Options Indexes
DAV On
AuthType Basic
AuthName "webdav"
AuthUserFile /etc/apache2/webdav.password
Require valid-user
</Location>

sudo htpasswd -c /etc/apache2/webdav.password pi
sudo chown root:www-data /etc/apache2/webdav.password
sudo chmod 640 /etc/apache2/webdav.password

sudo chown -R www-data:www-data /var/www/webdav

sudo systemctl restart apache2