Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Israel Torres / Kyle Price
- # 20141216 b
- # profilebuilder.sh
- # PoC profile builder for raspberry pi (tested on b+)
- #
- function get-sshRSA00 () {
- sshRSA00=$(ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub | cut -d ' ' -f 2)
- echo $sshRSA00
- }
- function get-eth000 () {
- eth000=$(ifconfig | grep eth0 | tr -s ' ' | cut -d ' ' -f 5)
- echo $eth000
- }
- function get-wlan000 () {
- wlan000=$(ifconfig | grep wlan | tr -s ' ' | cut -d ' ' -f 5)
- echo $wlan000
- }
- function get-internet00 () {
- internet00=$(curl -s http://ipecho.net/plain)
- echo $internet00
- }
- function get-piserial00 () {
- piserial00=$(grep 'Serial' /proc/cpuinfo | cut -d ' ' -f 2)
- echo $piserial00
- }
- sshRSA00=$(get-sshRSA00)
- eth000=$(get-eth000)
- wlan000=$(get-wlan000)
- internet00=$(get-internet00)
- piserial00=$(get-piserial00)
- echo -en "ssh :\t$sshRSA00\n"
- echo -en "eth0 :\t$eth000\n"
- echo -en "wlan0 :\t$wlan000\n"
- echo -en "internet0:\t$internet00\n"
- echo -en "serial no:\t$piserial00\n"
- #eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement