Jump to content

Unable to connect to wifi


Killroy_89

Recommended Posts

I'm not sure what I am doing wrong here, and its a bit embarrassing to ask, but here I go. 

I can't get my signal owl to connect to wifi and its driving me nuts.

I know I am overlooking something small but I need a second set of eyes. I have redirected WIFI_CONNECT.sh to give me some logs, but there are no errors. Here is my .sh file followed by my payload

root/payload/extensions/WIFI_CONNECT.sh

#!/bin/bash
#
# Title: WIFI_CONNECT
# Description: Simplifies WiFi client mode connection. Expects $WIFI_SSID and $WIFI_PASS
# Author: Hak5Darren

function WIFI_CONNECT() {
    logger running extension: WIFI_CONNECT
    ifconfig wlan0 up;sleep 10
    echo -e "network={\nssid=\"$WIFI_SSID\"\npsk=\"$WIFI_PASS\"\npriority=1\n}">/tmp/wpa.conf > /root/log3.txt
    wpa_supplicant -B -Dnl80211 -i wlan0 -c /tmp/wpa.conf > /root/log2.txt
    while(iwconfig wlan0 | grep Not-Associated); do sleep 1; done
    udhcpc -i wlan0
}
export -f WIFI_CONNECT

 

root/payloads/payload.txt

#!/bin/bash
# WiFi Client Setup

WIFI_SSID="Tammy&Gary"
WIFI_PASS="tammygary"

LED R SUCCESS
WIFI_CONNECT

# Optionally enable SSH
/etc/init.d/sshd start

LED R SUCCESS

 

Is anyone seeing anyting wrong here? I can enter arming mode just fine and ssh in over the ap, but I can't get the device to connect to my wireless.

Link to comment
Share on other sites

It was suggested that  I escape the & character inside the ssid. This worked, I did however send the logs from the wifi_connect.sh to let me view the output. Once viewed, I reverted back to the original script.

echo -e "network={\nssid=\"$WIFI_SSID\"\npsk=\"$WIFI_PASS\"\npriority=1\n}">/tmp/wpa.conf was sent to log 1 

network={
ssid="Tammy&Gary"
psk="tammygary"
priority=1
}

wpa_supplicant -B -Dnl80211 -i wlan0 -c /tmp/wpa.conf log 2

Successfully initialized wpa_supplicant

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...