Aktualisierung automatisch alle 5 Minuten.
Raspberry Pi: Linux kernel is now 4.0
Seit ein paar Tagen gibt es den neuen Linux Kernel 4.0.
Grund genug eine neue Firmware auf dem Raspberry PI einzuspielen:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
# erst das System updaten sudo apt-get update sudo apt-get upgrade # dann mal die alte Version ausgeben uname -a # Firmware update starten sudo rpi-update # ein paar Minuten später ist noch ein Reboot nötig sudo reboot # Neue Version checken uname -a # OK: Linux pi 4.0.9+ #807 PREEMPT Fri Jul 24 23:23:23 BST 2015 armv6l GNU/Linux # Check, Fhem läuft auch ;-) |
Raspberry Pi: Antennen innen oder außen
Mit dem Raspberry Pi und einer selbstgebauten Antenne, empfange ich Flugzeugtransponder Daten. An einem Tag, hatte ich die Antenne mal draußen mit freier Sicht in alle Richtungen angebracht um die Frage zu klären: Welche Auswirkung hat der Antennen Standort auf dem Empfang? Der Empfang kann also leicht verdoppelt werden, wie die folgenden Grafik zeigt:
Was meint Ihr, an welchem Tag habe ich diesen Versuch gemacht? 😉
Raspberry Pi: Temperaturen und Luftfeuchtigkeit aus Langenhagen, aktuell 42 Grad Celsius – alle 5 Minuten neue Werte direkt von der Terrasse
Weil es heute so heiß ist, wollt ich die Temperaturen die auf der Terrasse gemessen und drahtlos zum Fhem Server gesendt werden, mal hier veröffentlichen.
Wie können die Werte an ThingSpeak gesendet werden. Einfach in der fhem.cfg diesen Eintrag machen: „Raspberry Pi: Temperaturen und Luftfeuchtigkeit aus Langenhagen, aktuell 42 Grad Celsius – alle 5 Minuten neue Werte direkt von der Terrasse“ weiterlesen
Raspberry Pi: SNMP (Simple Network Management Protocol) installation in einer Stunde und Abfrage der CPU Temperatur per SNMP
Wie kann net-snmp auf dem Raspberry Pi installiert werden? Da es noch kein fertiges Package für den Raspberry Pi (Kali) gibt, ist selbst compilieren angesagt.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# System updaten sudo apt-get update sudo apt-get upgrade # Nötige libs sudo apt-get install libperl-dev mkdir net-snmp cd net-snmp # Download von aktuelles Archive von http://sourceforge.net/projects/net-snmp wget http://sourceforge.net/projects/net-snmp/files/net-snmp/5.7.3/net-snmp-5.7.3.tar.gz # auspacken tar -xvzf net-snmp-5.7.3.tar.gz cd net-snmp-5.7.3/ # setup, es kommen drei Fragen, beantworten oder mit Return den default wählen sudo ./configure # warten ... |
Wenn diese Bestätigung kommt:
Dann weiter mit compilieren und installieren. Das kann eine Stunde dauern … „Raspberry Pi: SNMP (Simple Network Management Protocol) installation in einer Stunde und Abfrage der CPU Temperatur per SNMP“ weiterlesen
Raspberry Pi: Kismet WLAN Auswertung in Hannover und Langenhagen in 2015
Wie hier beschrieben, können die Kismet Dateien auch ausgewertet werden, da sie in einer DB vorliegen. Also erst einmal die Anzahl der vorhandenen WLANs die in 2015 mit einem Raspberry Pi und Kismet inkl. GPS Modul in Langenhagen und Hannover empfangen wurden.
1 |
sqlite3 wireless.dbl "select count(*) from wireless" |
Ausgabe: 4416
Nun wollen wir mal sehen, wie so die jeweiligen Verschlüsselungsmodus sind.
1 |
sqlite3 wireless.dbl "select Encryption, count(Encryption) from wireless group by Encryption" |
Ausgabe:
None |645
WEP |77
WPA Migration Mode WEP40 WPA+TKIP WPA+PSK |1
WPA+AES-CCM |143
WPA+PSK WPA+AES-CCM |1630
WPA+TKIP |12
WPA+TKIP WPA+AES-CCM |32
WPA+TKIP WPA+PSK |124
WPA+TKIP WPA+PSK WPA+AES-CCM |1752
Diese Daten in einer Grafik:
UPDATE 5.4.15: Neue Auswertung mit Basis 10012 Einträge aus Hannover und Langenhagen. Die wireless.dbl hat jetzt eine Größe von 5,5 MB.
1 2 3 4 5 6 7 8 9 10 |
None|1368 WEP|179 WEP40 WPA+TKIP WPA+PSK|1 WPA Migration Mode WEP40 WPA+TKIP WPA+PSK|1 WPA+AES-CCM|249 WPA+PSK WPA+AES-CCM|3634 WPA+TKIP|23 WPA+TKIP WPA+AES-CCM|70 WPA+TKIP WPA+PSK|341 WPA+TKIP WPA+PSK WPA+AES-CCM|4146 |
Die nicht verschlüsselten WLANs sind meistens kostenpflichtige Zugänge von Kabel-Deutschland und auch von der Telekom. Hotels und Geschäfte haben auch oft öffentliche WLAN Zugänge. Ein paar private User sind aber auch dabei 😉
Raspberry Pi: Wie kann ein Hardware-Reset-Taster eingebaut werden?
Der Lötkolben war gerade noch heiß, deshalb noch mal eben zwei Kontakte an dem Raspberry Pi (Model B Revision 2.0, ältere Rev. haben diese Reset Logik nicht, meiner hat Rev. 7, siehe cat /proc/cpuinfo) angelötet. In der 2 Rev. des rPi kann an P6 eine Steckerleiste angelötet werden. Wenn diese beiden Kontakte über einen Taster geschlossen werden, wird ein Hardware-Reset ausgelöst. Ist evl. mal ganz hilfreich.
Hier findet Ihr die zwei P6 Lötpunkte, an denen ich die Steckerleiste angelötet haben:
Jessie: RPI-Monitor für den Raspberry Pi installieren
Dieser Entwurf aus dem letzten Jahr, wollte ich nun auch noch veröffentlichen. Wer einen RPI-Monitor braucht:
Wie hier gut beschrieben die Version 2.6.1 installieren, da die aktuelle Version 2.9.1 unter jessie nicht läuft.
Aber auch auf der RPI-Monitor Seite wird die Installation ausführlich beschrieben.
1 2 3 4 5 |
sudo apt-get update && sudo apt-get upgrade sudo apt-get install dpkg-dev librrds-perl libhttp-daemon-perl libjson-perl libipc-sharelite-perl libfile-which-perl wget --no-check-certificate https://github.com/XavierBerger/RPi-Monitor-deb/raw/master/packages/rpimonitor_2.6-1_all.deb sudo dpkg -i rpimonitor_2.6-1_all.deb rm rpimonitor_2.6-1_all.deb |
Nun im Browser http://IP:8888/ aufrufen.
„Jessie: RPI-Monitor für den Raspberry Pi installieren“ weiterlesen
Raspberry Pi: GPS-Module GY-GPS6MV2 einrichten
Haben nun auch einen GPS-Empfänger (Datenblatt (pdf)) bekommen. Hier ein paar Highlights:
- Model: GY-GPS6MV2
- Power Supply Range: 3 V to 5 V
- Ceramic antenna
- EEPROM for saving the configuration data when powered off
- Backup battery
- LED signal indicator
- Antenna Size: 25 x 25 mm
- Module Size: 25 x 35 mm
- Default Baud Rate: 9600 bps
Klein und billig: „Raspberry Pi: GPS-Module GY-GPS6MV2 einrichten“ weiterlesen
Raspberry Pi: „Man merkt oft erst, was man hatte, wenn man es verliert“
Nach dem Motto „Man merkt oft erst, was man hatte, wenn man es verliert“, mal die Package entfernen die nach einer Neuinstallation von mir meistens nicht benötigt werden, und nur Platz verschwenden, da der Raspberry Pi bei mir immer über die Kommandozeile per SSH bedient wird.
Es werden also keine X-Server usw. benötigt. Für Packages die nicht installiert sind, braucht es auch keine Sicherheitsupdates und wenn man doch mal ein Package braucht kann man es ja auch leicht wieder installieren.
1 2 3 4 5 6 7 |
sudo apt-get update sudo apt-get upgrade sudo apt-get remove x11-common x11-utils x11-xkb-utils libx11-6 lxde-common wolfram-engine sudo apt-get autoremove dpkg --list | grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge sudo apt-get autoclean sudo rpi-update |
Jetzt kann mal mal mit df -h
schauen, was man verloren hat:
Ok, auf der 8 GB Karte ist noch 6 GB Frei!
Oder habe ich noch was vergessen, was nicht benötigt wird (dpkg --list
)? Gern als Kommentar.
Raspberry Pi: Neue Firmware vom 17.10.2014 (Version 3.12.30) installieren
Vor ein paar Tagen ist eine neue Firmware für den Raspberry Pi erschienen. Wie kann die installiert werden? Wie kann die installierte Version angezeigt werden?
Am einfachsten benutzt man den update Befehl sudo rpi-update
mit dem Hexxeh updater. Wenn es eine neue Firmware gibt, wird die in ein paar Minuten installiert. Wenn die Firmware schon aktuell ist, wird auch eine Meldung ausgegeben.
So läuft der Updateprozess:
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 rpi-update *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom *** Performing self-update % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 7635 100 7635 0 0 26509 0 --:--:-- --:--:-- --:--:-- 27967 *** Relaunching after update *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom *** Downloading specific firmware revision (this will take a few minutes) % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 168 0 168 0 0 291 0 --:--:-- --:--:-- --:--:-- 298 100 22.9M 100 22.9M 0 0 295k 0 0:01:19 0:01:19 --:--:-- 1153k *** Updating firmware *** Updating kernel modules *** depmod 3.12.30+ *** Updating VideoCore libraries *** Using HardFP libraries *** Updating SDK *** Running ldconfig *** Storing current firmware revision *** Deleting downloaded files *** Syncing changes to disk *** If no errors appeared, your firmware was successfully updated to 11bfdffaca95e630b1fed0a8992fee880c17c26d *** A reboot is needed to activate the new firmware |
Wie oben steht, ist nun noch ein sudo reboot
nötig und die neue Firmware ist aktualisiert.
Ist die Firmware schon aktuell, gib es folgende Meldung:
1 2 3 4 5 6 7 8 9 |
sudo rpi-update *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom *** Performing self-update % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 7635 100 7635 0 0 21159 0 --:--:-- --:--:-- --:--:-- 21876 *** Relaunching after update *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom *** Your firmware is already up to date |
Aber wie kann nun die aktuelle Version angezeigt werden?
Mit
1 |
uname -a |
Ergebnis:
1 |
Linux pi-entw 3.12.30+ #717 PREEMPT Fri Oct 17 18:46:31 BST 2014 armv6l GNU/Linux |
Oder auch mit mehr Details:
1 |
/opt/vc/bin/vcgencmd version |
Ergebnis:
1 2 3 |
Oct 17 2014 17:56:05 Copyright (c) 2012 Broadcom version 845092531e360acd37f2f1964157f8079c77edfb (clean) (release) |
Dabei ist der lange Sting hinter Version der Hashwert der Version.
Sollte der rpi-updater nicht vorhanden sein, kann er leicht wie auch hier beschrieben mit
1 |
sudo apt-get install rpi-update |
installiert werden. Er wird dann diese Abhängigkeiten, wie in dieser Mindmap verwenden:
Die aktuellste Firmware gibt es auf Github. Dort gibt es auch die Beschreibung, was es neu gibt. Zitat:“
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
kernel: Bump to 3.12.30 kernel: bcm2708: Eliminate i2s debugfs directory error Qualify the two regmap ranges uses by bcm2708-i2s ('-i2s' and '-clk') to avoid the name clash when registering debugfs entries. kernel: Improve __copy_to_user and __copy_from_user performance Provide a __copy_from_user that uses memcpy. On BCM2708, use optimised memcpy/memmove/memcmp/memset implementations. kernel: bcm2708-dmaengine: nobble peak throughput to prevend SD host lockups Artificially throttling DMA throughput to/from the SD host prevents errors seen on very high-spec UHS-1 cards.See: http://www.raspberrypi.org/forums/viewtopic.php?f=63&t=5057&start=275#p626694 firmware: dpi: Add options to alter dpi settings through dpi_output_format See: http://www.raspberrypi.org/forums/viewtopic.php?f=100&t=86658&p=628061#p628061 firmware: arm_loader: Avoid gpioman spam when POWER_LOW is not defined" |
Wie wird Truecrypt 7.1auf einem Raspberry Pi installiert?
Truecrypt 7.1 kann gut wie in dieser Anleitung beschrieben installiert werden.
Hier in Kurzform wie die nötigen Packages geladen, ausgepackt und selbst compiliert werden können, da es für den rPi keine fertigen Packages gibt. Der compile Vorgang dauert ca. 1 Stunde, dabei darf das Terminal Fenster nicht geschlossen werden.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
sudo apt-get update sudo apt-get upgrade sudo apt-get install libfuse-dev screen wget "https://github.com/AuditProject/truecrypt-verified-mirror/raw/master/Source/TrueCrypt%207.1a%20Source.tar.gz" tar xfz "TrueCrypt 7.1a Source.tar.gz" cd truecrypt-7.1a-source wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/*.h wget http://prdownloads.sourceforge.net/wxwindows/wxWidgets-2.8.12.tar.gz tar xfz wxWidgets-2.8.12.tar.gz make NOGUI=1 WX_ROOT=~/truecrypt-7.1a-source/wxWidgets-2.8.12 wxbuild make NOGUI=1 WXSTATIC=1 cp Main/truecrypt /usr/local/bin/ sudo chmod +x /usr/local/bin/truecrypt rm -rf truecrypt-7.1a-source/ rm TrueCrypt\ 7.1a\ Source.tar.gz truecrypt --version |
Ergebnis: TrueCrypt 7.1a
Nun alle Befehle ausgeben mit:
1 |
truecrypt --help |
liefert die Anleitung:
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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
Synopsis: truecrypt [OPTIONS] COMMAND truecrypt [OPTIONS] VOLUME_PATH [MOUNT_DIRECTORY] Commands: --auto-mount=devices|favorites Auto mount device-hosted or favorite volumes. --backup-headers[=VOLUME_PATH] Backup volume headers to a file. All required options are requested from the user. -c, --create[=VOLUME_PATH] Create a new volume. Most options are requested from the user if not specified on command line. See also options --encryption, -k, --filesystem, --hash, -p, --random-source, --quick, --size, --volume-type. Note that passing some of the options may affect security of the volume (see option -p for more information). Inexperienced users should use the graphical user interface to create a hidden volume. When using the text user interface, the following procedure must be followed to create a hidden volume: 1) Create an outer volume with no filesystem. 2) Create a hidden volume within the outer volume. 3) Mount the outer volume using hidden volume protection. 4) Create a filesystem on the virtual device of the outer volume. 5) Mount the new filesystem and fill it with data. 6) Dismount the outer volume. If at any step the hidden volume protection is triggered, start again from 1). --create-keyfile[=FILE_PATH] Create a new keyfile containing pseudo-random data. -C, --change[=VOLUME_PATH] Change a password and/or keyfile(s) of a volume. Most options are requested from the user if not specified on command line. PKCS-5 PRF HMAC hash algorithm can be changed with option --hash. See also options -k, --new-keyfiles, --new-password, -p, --random-source. -d, --dismount[=MOUNTED_VOLUME] Dismount a mounted volume. If MOUNTED_VOLUME is not specified, all volumes are dismounted. See below for description of MOUNTED_VOLUME. --delete-token-keyfiles Delete keyfiles from security tokens. See also command --list-token-keyfiles. --export-token-keyfile Export a keyfile from a security token. See also command --list-token-keyfiles. --import-token-keyfiles Import keyfiles to a security token. See also option --token-lib. -l, --list[=MOUNTED_VOLUME] Display a list of mounted volumes. If MOUNTED_VOLUME is not specified, all volumes are listed. By default, the list contains only volume path, virtual device, and mount point. A more detailed list can be enabled by verbose output option (-v). See below for description of MOUNTED_VOLUME. --list-token-keyfiles Display a list of all available security token keyfiles. See also command --import-token-keyfiles. --mount[=VOLUME_PATH] Mount a volume. Volume path and other options are requested from the user if not specified on command line. --restore-headers[=VOLUME_PATH] Restore volume headers from the embedded or an external backup. All required options are requested from the user. --save-preferences Save user preferences. --test Test internal algorithms used in the process of encryption and decryption. --version Display program version. --volume-properties[=MOUNTED_VOLUME] Display properties of a mounted volume. See below for description of MOUNTED_VOLUME. MOUNTED_VOLUME: Specifies a mounted volume. One of the following forms can be used: 1) Path to the encrypted TrueCrypt volume. 2) Mount directory of the volume's filesystem (if mounted). 3) Slot number of the mounted volume (requires --slot). Options: --display-password Display password characters while typing. --encryption=ENCRYPTION_ALGORITHM Use specified encryption algorithm when creating a new volume. --filesystem=TYPE Filesystem type to mount. The TYPE argument is passed to mount(8) command with option -t. Default type is 'auto'. When creating a new volume, this option specifies the filesystem to be created on the new volume (only 'FAT' and 'none' TYPE is allowed). Filesystem type 'none' disables mounting or creating a filesystem. --force Force mounting of a volume in use, dismounting of a volume in use, or overwriting a file. Note that this option has no effect on some platforms. --fs-options=OPTIONS Filesystem mount options. The OPTIONS argument is passed to mount(8) command with option -o when a filesystem on a TrueCrypt volume is mounted. This option is not available on some platforms. --hash=HASH Use specified hash algorithm when creating a new volume or changing password and/or keyfiles. This option also specifies the mixing PRF of the random number generator. -k, --keyfiles=KEYFILE1[,KEYFILE2,KEYFILE3,...] Use specified keyfiles when mounting a volume or when changing password and/or keyfiles. When a directory is specified, all files inside it will be used (non-recursively). Multiple keyfiles must be separated by comma. Use double comma (,,) to specify a comma contained in keyfile's name. Keyfile stored on a security token must be specified as token://slot/SLOT_NUMBER/file/FILENAME. An empty keyfile (-k "") disables interactive requests for keyfiles. See also options --import-token-keyfiles, --list-token-keyfiles, --new-keyfiles, --protection-keyfiles. --load-preferences Load user preferences. -m, --mount-options=OPTION1[,OPTION2,OPTION3,...] Specifies comma-separated mount options for a TrueCrypt volume: headerbak: Use backup headers when mounting a volume. nokernelcrypto: Do not use kernel cryptographic services. readonly|ro: Mount volume as read-only. system: Mount partition using system encryption. timestamp|ts: Do not restore host-file modification timestamp when a volume is dismounted (note that the operating system under certain circumstances does not alter host-file timestamps, which may be mistakenly interpreted to mean that this option does not work). See also option --fs-options. --new-keyfiles=KEYFILE1[,KEYFILE2,KEYFILE3,...] Add specified keyfiles to a volume. This option can only be used with command -C. --new-password=PASSWORD Specifies a new password. This option can only be used with command -C. -p, --password=PASSWORD Use specified password to mount/open a volume. An empty password can also be specified (-p ""). Note that passing a password on the command line is potentially insecure as the password may be visible in the process list (see ps(1)) and/or stored in a command history file or system logs. --protect-hidden=yes|no Write-protect a hidden volume when mounting an outer volume. Before mounting the outer volume, the user will be prompted for a password to open the hidden volume. The size and position of the hidden volume is then determined and the outer volume is mounted with all sectors belonging to the hidden volume protected against write operations. When a write to the protected area is prevented, the whole volume is switched to read-only mode. Verbose list (-v -l) can be used to query the state of the hidden volume protection. Warning message is displayed when a volume switched to read-only is being dismounted. --protection-keyfiles=KEYFILE1[,KEYFILE2,KEYFILE3,...] Use specified keyfiles to open a hidden volume to be protected. This option may be used only when mounting an outer volume with hidden volume protected. See also options -k and --protect-hidden. --protection-password=PASSWORD Use specified password to open a hidden volume to be protected. This option may be used only when mounting an outer volume with hidden volume protected. See also options -p and --protect-hidden. --quick Do not encrypt free space when creating a device-hosted volume. This option must not be used when creating an outer volume. --random-source=FILE Use FILE as a source of random data (e.g., when creating a volume) instead of requiring the user to type random characters. --slot=SLOT Use specified slot number when mounting, dismounting, or listing a volume. --size=SIZE Use specified size in bytes when creating a new volume. -t, --text Use text user interface. Graphical user interface is used by default if available. This option must be specified as the first argument. --token-lib=LIB_PATH Use specified PKCS #11 security token library. --volume-type=TYPE Use specified volume type when creating a new volume. TYPE can be 'normal' or 'hidden'. See option -c for more information on creating hidden volumes. -v, --verbose Enable verbose output. IMPORTANT: If you want to use TrueCrypt, you must follow the security requirements and security precautions listed in chapter 'Security Requirements and Precautions' in the TrueCrypt documentation (file 'TrueCrypt User Guide.pdf'). Examples: Create a new volume: truecrypt -t -c Mount a volume: truecrypt volume.tc /media/truecrypt1 Mount a volume as read-only, using keyfiles: truecrypt -m ro -k keyfile1,keyfile2 volume.tc Mount a volume without mounting its filesystem: truecrypt --filesystem=none volume.tc Mount a volume prompting only for its password: truecrypt -t -k "" --protect-hidden=no volume.tc /media/truecrypt1 Dismount a volume: truecrypt -d volume.tc Dismount all mounted volumes: truecrypt -d |
Raspberry Pi BPMN 2.0 update Prozess Diagramm als Grafik exportieren
Dieser BPMN 2.0 Prozess wurde mit Eclipse modeliert und dann als Grafik exportiert.
Diese BPMN 2.0 Diagramme können auch leicht als Grafik exportiert werden. Dazu in dem Diagramm mit rechts klick und dann im Kontexmenü auf „Export Diagram…“.
Es öffnet sich dann der Export Dialog, dort können nun im BMP, GIF, JPG, PNG oder RLE Format die BPMN 2.0 Diagramme exportiert werden.
Raspberry Pi: Sniffen mit TShark, aber nicht als root User
Zuerst mal eine Mindmap zu TShark, dem Kommandline-Tool von Wireshark (frühe Ethereal).
Installation
Zuerste den rPi aktualisieren und das Packet installieren mit:
1 2 3 |
sudo apt-get update sudo apt-get upgrade sudo apt-get install tshark |
Zuerst einmal die Befehle und die Version für die Komandozeile mit
1 |
tshark -h |
ausgeben:
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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
TShark 1.12.1 (Git Rev Unknown from unknown) Dump and analyze network traffic. See http://www.wireshark.org for more information. Copyright 1998-2014 Gerald Combs <gerald@wireshark.org> and contributors. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Usage: tshark [options] ... Capture interface: -i <interface> name or idx of interface (def: first non-loopback) -f <capture filter> packet filter in libpcap filter syntax -s <snaplen> packet snapshot length (def: 65535) -p don't capture in promiscuous mode -I capture in monitor mode, if available -B <buffer size> size of kernel buffer (def: 2MB) -y <link type> link layer type (def: first appropriate) -D print list of interfaces and exit -L print list of link-layer types of iface and exit Capture stop conditions: -c <packet count> stop after n packets (def: infinite) -a <autostop cond.> ... duration:NUM - stop after NUM seconds filesize:NUM - stop this file after NUM KB files:NUM - stop after NUM files Capture output: -b <ringbuffer opt.> ... duration:NUM - switch to next file after NUM secs filesize:NUM - switch to next file after NUM KB files:NUM - ringbuffer: replace after NUM files Input file: -r <infile> set the filename to read from (- to read from stdin) Processing: -2 perform a two-pass analysis -R <read filter> packet Read filter in Wireshark display filter syntax -Y <display filter> packet displaY filter in Wireshark display filter syntax -n disable all name resolutions (def: all enabled) -N <name resolve flags> enable specific name resolution(s): "mntC" -d <layer_type>==<selector>,<decode_as_protocol> ... "Decode As", see the man page for details Example: tcp.port==8888,http -H <hosts file> read a list of entries from a hosts file, which will then be written to a capture file. (Implies -W n) Output: -w <outfile|-> write packets to a pcap-format file named "outfile" (or to the standard output for "-") -C <config profile> start with specified configuration profile -F <output file type> set the output file type, default is pcapng an empty "-F" option will list the file types -V add output of packet tree (Packet Details) -O <protocols> Only show packet details of these protocols, comma separated -P print packet summary even when writing to a file -S <separator> the line separator to print between packets -x add output of hex and ASCII dump (Packet Bytes) -T pdml|ps|psml|text|fields format of text output (def: text) -e <field> field to print if -Tfields selected (e.g. tcp.port, _ws.col.Info) this option can be repeated to print multiple fields -E<fieldsoption>=<value> set options for output when -Tfields selected: header=y|n switch headers on and off separator=/t|/s|<char> select tab, space, printable character as separator occurrence=f|l|a print first, last or all occurrences of each field aggregator=,|/s|<char> select comma, space, printable character as aggregator quote=d|s|n select double, single, no quotes for values -t a|ad|d|dd|e|r|u|ud output format of time stamps (def: r: rel. to first) -u s|hms output format of seconds (def: s: seconds) -l flush standard output after each packet -q be more quiet on stdout (e.g. when using statistics) -Q only log true errors to stderr (quieter than -q) -g enable group read access on the output file(s) -W n Save extra information in the file, if supported. n = write network address resolution information -X <key>:<value> eXtension options, see the man page for details -z <statistics> various statistics, see the man page for details --capture-comment <comment> add a capture comment to the newly created output file (only for pcapng) Miscellaneous: -h display this help and exit -v display version info and exit -o <name>:<value> ... override preference setting -K <keytab> keytab file to use for kerberos decryption -G [report] dump one of several available reports and exit default report="fields" use "-G ?" for more help WARNING: dumpcap will enable kernel BPF JIT compiler if available. You might want to reset it By doing "echo 0 > /proc/sys/net/core/bpf_jit_enable" |
Erst wollen wir uns die vorhandenen Interfaces anschauen und die Nummer merken.
1 |
sudo tshark -D |
Liefert die folgende Liste der verfügbaren Interfaces:
1. eth0
2. wlan0
3. wlan0mon
4. any
5. lo (Loopback)
6. nflog
7. nfqueue
8. usbmon1
Dann mal 10 Sekunden in die Datei traffic.pcap den Netzwerkverkehr von 1 (eth0) sichern mit:
1 |
tshark -i 1 -a duration:10 -w traffic.pcap |
Kommt es zu dieser Fehlermeldung:
1 2 3 |
Capturing on 'eth0' tshark: The capture session could not be initiated on interface 'eth0' (You don't have permission to capture on that device). Please check to make sure you have sufficient permissions, and that you have the proper interface or pipe specified. |
dann nicht aus Sicherheitsgründen mit sudo starten. TShark sollte nicht als root ausgeführt werden und der aktuelle User hat nicht die Rechte auf die Schnittstellen zuzugreifen.
Abhilfe
Den aktuellen User (hier pi) für den Zugriff reconfigurieren mit:
1 |
sudo dpkg-reconfigure wireshark-common |
Es erscheint so ein Dialog:
Dort mit Ja antworten.
Damit die Berechigung für den User (pi) gesetzt wird, und es nicht zu dieser Fehlermeldung kommt:
1 |
tshark: Couldn't run /usr/bin/dumpcap in child process: Keine Berechtigung |
Einmal:
1 |
sudo usermod -a -G wireshark pi |
Dann einmal abmelden:
1 |
exit |
und wieder anmelden.
Schon können Dateien im PCAP Format auf dem Raspberry Pi erzeugt werden und auf einem anderen Rechner mit Wireshark ausgewertet werden.
Wie kann die Demo-Anwendung von OpenHab auf dem Raspberry Pi erweitert und von einem iPad bzw. iPhone aufgerufen werden?
In diesem Blog Beitrag habe ich beschrieben, wie OpenHab auf den rPi eingerichtet wird. Nun wollen wir analog zur Demo-Anwendung eine eigene Haus-Anwendung schreiben bzw. erstellen und sie nach und nach erweitern.
So sieht die Demo-Anwendung aus:
Die Demo-Anwendung wird wesentlich in zwei Dateien bearbeitet die man sich mal anschauen sollte:
1. /configuration/items/demo.items
2. /configuration/sitemap/demo.sitemap
„Wie kann die Demo-Anwendung von OpenHab auf dem Raspberry Pi erweitert und von einem iPad bzw. iPhone aufgerufen werden?“ weiterlesen
Mindmap zum Thema Hausautomatisation: OpenHab
Mindmap zum Artikel: Wie kann OpenHab und eine Demo-Anwendung auf einem Raspberry Pi (Debian) installiert werden?
Wie kann das Sicherheitsupdate für die Linux-Bash (CVE-2014-6271) des Raspberry Pi gescheckt und installiert werden?
Wie in dem Heise Artikel beschrieben, gibt es in der bash eine Sicherheitslücke CVE-2014-6271.
Das sind die Abhängigkeiten der bash, auf meinem Raspberry Pi (Debian, Jessie)
Für den Raspberry Pi gibt es schon ein Update. Ob das System verletzbar ist kann wie folgt in der Konsole getestet werden:
1 |
env x='() { :;}; echo verwundbar' bash -c "echo Test ob die bash verwundbar ist." |
Wenn das System verletzbar ist, wird „verwundbar“ ausgegeben:
Auch mit:
1 |
apt-show-versions bash |
bekommt man den Hinweis, das ein Update möglich ist.
Also den rPi updaten mit:
1 2 |
sudo apt-get update sudo apt-get upgrade |
Dann noch checken, mit dem Test:
Ok.
Und noch mal die Version checken:
Ok, wir sind nun wieder auch der sicheren Seite oder doch nicht (ShellShock) (CVE-2014-7169).
Wie wird auf dem Raspberry Pi die aktuell installierte Debian Version angezeigt?
Wer die Raspbian Debian Wheezy Version: September 2014 installiert hat, hat die neueste Version vom Release: 9.9.2014 URL: raspbian.org mit Kernel version: 3.12. installiert.
Wie kann auf dem rPi diese Infos ermittelt werden?
Der Name und die Release Version steht in der Datei /etc/issue
und kann auf der Konsole mit:
1 |
cat /etc/issue |
ausgegeben werden. Es wird bei mir ausgegeben:
1 |
Raspbian GNU/Linux 7 |
Details unter „Wie wird auf dem Raspberry Pi die aktuell installierte Debian Version angezeigt?“ weiterlesen
Wie kann für Präsentationen usw. eine Schlagwortwolke (tag cloud, word cloud) erzeugt werden?
Wer eine einfach Schlagwortwolken braucht, kann so was über tagcrowd.com kostenlos erzeugen lassen.
Schönere Ergebnisse, gab es hier bei wordle.net/create. Dazu muss aber Java im Browser aktiviert werden. So sieht das Applet aus:
Hier mal sechs Beispiele, die Möglichkeiten sind unendlich:
„Wie kann für Präsentationen usw. eine Schlagwortwolke (tag cloud, word cloud) erzeugt werden?“ weiterlesen
Wie kann Mathematica bzw. Wolfram vom Raspberry Pi Modell B+ entfernt werden, um ca. 500 MB Speicher freizugeben?
In dem guten Artikel von Michael Kofler wird in Kurzform ein schöner Überblick über das für private Nutzung kostenlose Wolfram gegeben. Das mit allen Raspberry Pi ausgelieferte Wolfram, nimmt nur sehr viel Platz auf der Karte ein, ca. 500 MB.
Kein Wunder bei diesen Abhängigkeiten:
Bevor es gelöscht wird, muss aber noch einmal schnell ein „Hallo Welt“ programmiert und ausgeführt werden. „Wie kann Mathematica bzw. Wolfram vom Raspberry Pi Modell B+ entfernt werden, um ca. 500 MB Speicher freizugeben?“ weiterlesen