Jump to content

Mit0s1s

Recommended Posts

Version 2.3 is now released!

SMSer alows you to control your pineapple through your phone by simply sending it a text message. It does this using Multimedia Messaging Service or MMS. Through SMSer you can turn on or off karma and dns spoof by sending it key words that you would use in an everyday conversation as well as any 3 custom commands that you setup your self.

Features:

  • Turn on karma
  • Turn on DNS spoof
  • Turn on SSL Strip
  • Get Status of Karma, DNS Spoof, and SSL Strip
  • Control individual LEDs on the pineapple
  • Control all LEDs on the pineapple
  • Ability to have 2 factor authentication when logging into the pineapple
  • Execute 3 custom commands
  • New Command Line Integration

Change Log:

version 2.3 Changes

  • Fixed base64 encoding issue for sprint (special thanks to THCMinister)
  • Improved logging
  • Fixed typos in keywords
  • Added a delete option for "Received Messages"
  • Added a warning for Two Factor Login
  • Added command-line integration

Version 2.2 Changes

  • Minor Bug Fixes
  • Quality of life improvements
  • Interface tweaks
  • Better debugging capabilities

Version 2.1 Changes

  • Minor Bug Fixes

Version 2.0 Changes

  • No Longer runs as cron job
  • Improved Logging
  • Ability to control more services
  • Ability to check status of services
  • Fixed issues with LEDs
  • Improved chances of successfully reading a message
  • Interface tweaks
  • Added 2 factor login
  • Added doc string to every function in source code
  • Various other improvements

Requirements:

  • A phone or other means of texting
  • A gmail account with basic security (username and password ONLY)

Known Issues:

  • Sprint encodes there messages in base64 which SMSer currently can not decode (will be fixed in version 2.3)

Edited by newbi3
Link to comment
Share on other sites

  • 2 weeks later...

I have smser installed on my markv pineapple. I can get all the messages and replies from the pineapple, but do not get any actions on my commands. For example. I tell it to turn the lights off. I get a reply stating that they are off, but the lights are still on. I have tried this with blackout installed and uninstalled. This is a brand new, out of the box markv with nothing done, except to install the infusions.

I also tried other commands. Nothing is activating when the commands are received. The logs show that the messages are received and replied to.

Any help would be appreciated.

Link to comment
Share on other sites

I have smser installed on my markv pineapple. I can get all the messages and replies from the pineapple, but do not get any actions on my commands. For example. I tell it to turn the lights off. I get a reply stating that they are off, but the lights are still on. I have tried this with blackout installed and uninstalled. This is a brand new, out of the box markv with nothing done, except to install the infusions.

I also tried other commands. Nothing is activating when the commands are received. The logs show that the messages are received and replied to.

Any help would be appreciated.

I recently had a discussion about this with the developer. It has to do with the way the messages are parsed.

Try adding a random word before and after the keywords. For example instead of "turn off the lights" try using "pineapple turn off the lights please" or "hey open the front door now"

Edited by chriswhat
Link to comment
Share on other sites

chriswhat,

Thanks for your reply. I have tried that, as I read that from the other threads on this issue. It doesnt seem to make any difference. I have reset the router to factory defaults a few times and tried installing the fusion just by itself. I will keep trying to get it working. I will keep playing with it. Im sure I will get it working soon.

Link to comment
Share on other sites

I did some digging around and Im not sure what to make of this. I looked at the source code and was able to activate karma by typing the following in the command line:

"hostapd_cli -p /var/run/hostapd-phy0 karma_enable"

I could disable it by typing in

"hostapd_cli -p /var/run/hostapd-phy0 karma_disable"

I found both commands in the payload.

However, when I tried typing in the commands for led control, i got an error.

commands are : "ledcontrol wps off" "ledcontrol usb off" "ledcontrol wan off" "ledcontrol wlan off" etc.

The error I get is....: ledcontrol: not found

So, i went to the try to get to the path listed at the top of the source code #!/usr/bin/python and that directory doesnt exist.

My quandry is this.... i still get replies from the infusion, but no actions... I have tried chriswhat's suggestion and still dont get any actions, just replies.

im probably overlooking something.

DISCLAIMER: I am not a coder at all.

UPDATE: I was able to get karma to work correctly with the text message now. it wasnt working last night. i will try the leds again

Edited by redneck
Link to comment
Share on other sites

I did some digging around and Im not sure what to make of this. I looked at the source code and was able to activate karma by typing the following in the command line:

"hostapd_cli -p /var/run/hostapd-phy0 karma_enable"

I could disable it by typing in

"hostapd_cli -p /var/run/hostapd-phy0 karma_disable"

I found both commands in the payload.

However, when I tried typing in the commands for led control, i got an error.

commands are : "ledcontrol wps off" "ledcontrol usb off" "ledcontrol wan off" "ledcontrol wlan off" etc.

The error I get is....: ledcontrol: not found

So, i went to the try to get to the path listed at the top of the source code #!/usr/bin/python and that directory doesnt exist.

My quandry is this.... i still get replies from the infusion, but no actions... I have tried chriswhat's suggestion and still dont get any actions, just replies.

im probably overlooking something.

DISCLAIMER: I am not a coder at all.

UPDATE: I was able to get karma to work correctly with the text message now. it wasnt working last night. i will try the leds again

The LED functions don't work for the Mk V. They code is suited for the Mk IV.

Link to comment
Share on other sites

Yeah sorry about that. When I was working on the port over to the new hardware I completely forgot about the LEDs... This will be fixed in version 2.0 which I am working on with all of the spare time that I have right now.

If you want to patch it yourself you can replace those commands with:

lights = ["red", "blue", "amber"]
		for i in range(0, len(lights)-1):
			os.system("led " + lights[i] + " on")

Keep an eye out for 2.0 should be out in 1-3 months (depending on work schedule)

Link to comment
Share on other sites

  • 3 weeks later...

newbi3

Thanks for the update. I will see if I can figure out how to change the commands... Thanks for all your hard work

Redneck,

I put something together for you so you can control your Mark V's LEDs with SMSer 1.4. Just follow the guide below.

How To: Add Mark V LED Control Functionality to SMSer 1.4

First, we need to connect to our WiFi Pineapple and retrieve the smser.py file

Step 1: Connect to your WiFi Pineapple via Wi-Fi or ethernet cable

Step 2: Open a terminal

Step 3: SSH into your WiFi Pineapple

ssh root@172.16.42.1
<pineapple's password>

Step 4: Copy the smser.py file from your WiFi Pineapple to your computer via SCP

scp /pineapple/components/infusions/smser/content/smser.py <user>@<ip address>:/<path>
<computer's password>
  • Replace <user> with your computer's name or username (i.e. JohnDoe)
  • Replace <ip address> with your computer's IP address (i.e. 172.16.42.212)
  • Replace <path> with the location where you want to copy the smser.py file to (i.e. /Users/John/Desktop)
  • Example: scp /pineapple/components/infusions/smser/content/smser.py JohnDoe@172.16.42.212:/Users/John/Desktop

Now we need to make some changes to the smser.py file

Step 5: Open the smser.py file with a text editor

Step 6: Locate the following code (should be near lines 247 through 265):

if "light" in payload and "off" in payload or "lights" in payload and "off" in payload:
    buildReply = reply, prePhrases[randPre], phrases[5], states[3]
    reply = ''.join(buildReply)
    replied = True
    os.system("ledcontrol wps off")
    os.system("ledcontrol usb off")
    os.system("ledcontrol wan off")
    os.system("ledcontrol wlan off")
    os.system("ledcontrol lan off")

if "light" in payload and "on" in payload or "lights" in payload and "on" in payload:
    buildReply = reply, prePhrases[randPre], phrases[5], states[4]
    reply = ''.join(buildReply)
    replied = True
    os.system("ledcontrol wps on")
    os.system("ledcontrol usb on")
    os.system("ledcontrol wan on")
    os.system("ledcontrol wlan on")
    os.system("ledcontrol lan on") 

Step 7: Replace the code above with the following code:

if "light" in payload and "off" in payload or "lights" in payload and "off" in payload:
    buildReply = reply, prePhrases[randPre], phrases[5], states[3]
    reply = ''.join(buildReply)
    replied = True
    os.system("led red off")
    os.system("led blue off")
    os.system("led amber off")

if "light" in payload and "on" in payload or "lights" in payload and "on" in payload:
    buildReply = reply, prePhrases[randPre], phrases[5], states[4]
    reply = ''.join(buildReply)
    replied = True
    os.system("led red on")
    os.system("led blue on")
    os.system("led amber on") 

Step 8: When you're finished replacing the code, save and close the smser.py file

Now we need to send the modified smser.py file back to our WiFi Pineapple

Step 9: Open a terminal

Step 10: Send the smser.py file back to your WiFi Pineapple via SCP

scp <path>/smser.py root@172.16.42.1:/pineapple/components/infusions/smser/content/smser.py 
  • Replace <path> with the location of the smser.py file on your computer (i.e. /Users/John/Desktop/smser.py)
  • Example: scp /Users/John/Desktop/smser.py root@172.16.42.1:/pineapple/components/infusions/smser/content/smser.py

Now we need to test SMSer to determine if we can control the LEDs as intended

Step 11: Connect your WiFi Pineapple to the internet via client mode, ethernet cable, or USB tether

Step 12: Log into your WiFi Pineapple's web interface and ensure that SMSer is configured and running

Step 13: To disable the LEDs, compose a text message containing the following text and send it to the email address that you configured SMSer to check

Pineapple turn the lights off now please
  • Within 1 to 2 minutes, you should receive a response and your WiFi Pineapple's red, blue, and amber LEDs should turn off.

Step 14: To enable the LEDs, compose a text message containing the following text and send it to the email address that you configured SMSer to check

Pineapple turn the lights on now please
  • Within 1 to 2 minutes, you should receive another response and your WiFi Pineapple's LEDs should turn back on.

That's it. You should now be able to control your Pineapple's LEDs via text message. If you want to control the red, blue, and amber LEDs separately, let me know and I'll post the modified code for you. Enjoy!

Edited by chriswhat
Link to comment
Share on other sites

Redneck,

I put something together for you so you can control your Mark V's LEDs with SMSer 1.4. Just follow the guide below.

How To: Add Mark V LED Control Functionality to SMSer 1.4

First, we need to connect to our WiFi Pineapple and retrieve the smser.py file

Step 1: Connect to your WiFi Pineapple via Wi-Fi or ethernet cable

Step 2: Open a terminal

Step 3: SSH into your WiFi Pineapple

ssh root@172.16.42.1
<pineapple's password>

Step 4: Copy the smser.py file from your WiFi Pineapple to your computer via SCP

scp /pineapple/components/infusions/smser/content/smser.py <user>@<ip address>:/<path>
<computer's password>
  • Replace <user> with your computer's name or username (i.e. JohnDoe)
  • Replace <ip address> with your computer's IP address (i.e. 172.16.42.212)
  • Replace <path> with the location where you want to copy the smser.py file to (i.e. /Users/John/Desktop)
  • Example: scp /pineapple/components/infusions/smser/content/smser.py JohnDoe@172.16.42.212:/Users/John/Desktop

Now we need to make some changes to the smser.py file

Step 5: Open the smser.py file with a text editor

Step 6: Locate the following code (should be near lines 247 through 265):

if "light" in payload and "off" in payload or "lights" in payload and "off" in payload:
    buildReply = reply, prePhrases[randPre], phrases[5], states[3]
    reply = ''.join(buildReply)
    replied = True
    os.system("ledcontrol wps off")
    os.system("ledcontrol usb off")
    os.system("ledcontrol wan off")
    os.system("ledcontrol wlan off")
    os.system("ledcontrol lan off")

if "light" in payload and "on" in payload or "lights" in payload and "on" in payload:
    buildReply = reply, prePhrases[randPre], phrases[5], states[4]
    reply = ''.join(buildReply)
    replied = True
    os.system("ledcontrol wps on")
    os.system("ledcontrol usb on")
    os.system("ledcontrol wan on")
    os.system("ledcontrol wlan on")
    os.system("ledcontrol lan on") 

Step 7: Replace the code above with the following code:

if "light" in payload and "off" in payload or "lights" in payload and "off" in payload:
    buildReply = reply, prePhrases[randPre], phrases[5], states[3]
    reply = ''.join(buildReply)
    replied = True
    os.system("led red off")
    os.system("led blue off")
    os.system("led amber off")

if "light" in payload and "on" in payload or "lights" in payload and "on" in payload:
    buildReply = reply, prePhrases[randPre], phrases[5], states[4]
    reply = ''.join(buildReply)
    replied = True
    os.system("led red on")
    os.system("led blue on")
    os.system("led amber on") 

Step 8: When you're finished replacing the code, save and close the smser.py file

Now we need to send the modified smser.py file back to our WiFi Pineapple

Step 9: Open a terminal

Step 10: Send the smser.py file back to your WiFi Pineapple via SCP

scp <path>/smser.py root@172.16.42.1:/pineapple/components/infusions/smser/content/smser.py 
  • Replace <path> with the location of the smser.py file on your computer (i.e. /Users/John/Desktop/smser.py)
  • Example: scp /Users/John/Desktop/smser.py root@172.16.42.1:/pineapple/components/infusions/smser/content/smser.py

Now we need to test SMSer to determine if we can control the LEDs as intended

Step 11: Connect your WiFi Pineapple to the internet via client mode, ethernet cable, or USB tether

Step 12: Log into your WiFi Pineapple's web interface and ensure that SMSer is configured and running

Step 13: To disable the LEDs, compose a text message containing the following text and send it to the email address that you configured SMSer to check

Pineapple turn the lights off now please
  • Within 1 to 2 minutes, you should receive a response and your WiFi Pineapple's red, blue, and amber LEDs should turn off.

Step 14: To enable the LEDs, compose a text message containing the following text and send it to the email address that you configured SMSer to check

Pineapple turn the lights on now please
  • Within 1 to 2 minutes, you should receive another response and your WiFi Pineapple's LEDs should turn back on.

That's it. You should now be able to control your Pineapple's LEDs via text message. If you want to control the red, blue, and amber LEDs separately, let me know and I'll post the modified code for you. Enjoy!

If you are using version 1.4 of SMSer this will work for you.

This has been patched in the next release (coming soon).

Link to comment
Share on other sites

  • 4 weeks later...

SMSer 2.0 Has been released! Please download, it includes patches for LED control and custom command 3 not working as well as new features like enabling/disabling SSL Strip and getting the status of karma, dns spoof, and SSL Strip. Also a beta feature is 2 factor authentication for the login page of the wifi pineapple!

Link to comment
Share on other sites

Been messing with version 2.0 and for whatever reason I can't get SMSer to recognize any keywords.

- installed in both SD and internal storage (made no difference)

- am able to receive all messages from SMSer to cell phone (test msg and all error msgs do show up in cell phone texts)

- using one word like "hello" responds with "Could you repeat that for me?"

- wrapping words around keywords such as "Sup hello dude" responds the same way as just "hello"

- repeating the keyword as in "hello hello hello hello" is unrecognized by SMSer as having any keywords

Would appreciate any suggestions.

Edited by Lockon
Link to comment
Share on other sites

I would like some help with this module.

I have it installed on my new mark 5,I entered the email address and password,my phone number,and the gateway. I am on Verizon so im using "phonenumber@vtext.com" but with "phonenumber" being my 10 digit phone number. I am not using 2-factor auth. because i just created a gmail account for my pineapple and wanted to keep it simple. I have clicked the SEND on "Text Message | SEND" and waited for over 5 minutes. Still with no text from the pineapple. Any help would be great.

-NickL-Dominator 7Aa

Link to comment
Share on other sites

Been messing with version 2.0 and for whatever reason I can't get SMSer to recognize any keywords.

- installed in both SD and internal storage (made no difference)

- am able to receive all messages from SMSer to cell phone (test msg and all error msgs do show up in cell phone texts)

- using one word like "hello" responds with "Could you repeat that for me?"

- wrapping words around keywords such as "Sup hello dude" responds the same way as just "hello"

- repeating the keyword as in "hello hello hello hello" is unrecognized by SMSer as having any keywords

Would appreciate any suggestions.

who is your carrier?

Link to comment
Share on other sites

Sprint

Ok I'm going to release an update which will give you the tools I need to debug the issue be looking for that it will be version 2.2

Link to comment
Share on other sites

I would like some help with this module.

I have it installed on my new mark 5,I entered the email address and password,my phone number,and the gateway. I am on Verizon so im using "phonenumber@vtext.com" but with "phonenumber" being my 10 digit phone number. I am not using 2-factor auth. because i just created a gmail account for my pineapple and wanted to keep it simple. I have clicked the SEND on "Text Message | SEND" and waited for over 5 minutes. Still with no text from the pineapple. Any help would be great.

-NickL-Dominator 7Aa

This is the forum for the mk4 but that aside try to send an email from your gmail account to number@gateway. Also post the output of the logs

Link to comment
Share on other sites

  • 1 month later...

i have a problem. I config:

smser.conf
password:**********
number:849894*****
cmd1:echo hello world
cmd2:whats going on
cmd3:thanks
but in smser.log
2014-01-04 17:05:29.366218 - Missing config file: /pineapple/components/infusions/smser/content/smser.conf
2014-01-04 17:05:29.373347 - Missing config file: /pineapple/components/infusions/smser/content/smser.conf
Don't send sms, don't test, don't use ????? And, I start smser infusion but web interface don't start. It's disable
Can you show me how to fix that?
Edited by ThanhBT
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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