Jump to content

Nyan Cat Payload (revised)


Recommended Posts

Here's the revised NYAN Cat payload I used for my talk at SXSW. I noticed an issue with mobile phones not playing the annoying music so I changed the embed code to use HTML5.

<HTML><Head><Title>NYAN CAT!!! </Title></Head> <Body>
<img src="NYAN.gif" width="500" height="350"><br />
   <audio controls="controls" autoplay="true">
     <source src="/NYAN.mp3" type="audio/mp3" />
   </audio>
</Body></HTML>

Works great against desktop browsers and Android phones, but still no pwnage on iPhone. Sad too because the iPhone will pop up the index page thinking it's a captive portal asking for EULA or payment on connect (how convenient) but no sound.

Tried various embed methods without much luck. Wish the iphone supported HTML5 properly, or at least Flash. Perhaps there are Quicktime controls that could be used.

On a related note it was pointed out that adding:

option 'error_page' '/index.php'

under the index_page option in /etc/config/uhttpd would nail error pages, not just root domains. Good call.

Link to comment
Share on other sites

Here's the revised NYAN Cat payload I used for my talk at SXSW. I noticed an issue with mobile phones not playing the annoying music so I changed the embed code to use HTML5.

<HTML><Head><Title>NYAN CAT!!! </Title></Head> <Body>
<img src="NYAN.gif" width="500" height="350"><br />
   <audio controls="controls" autoplay="true">
 	<source src="/NYAN.mp3" type="audio/mp3" />
   </audio>
</Body></HTML>

Works great against desktop browsers and Android phones, but still no pwnage on iPhone. Sad too because the iPhone will pop up the index page thinking it's a captive portal asking for EULA or payment on connect (how convenient) but no sound.

Tried various embed methods without much luck. Wish the iphone supported HTML5 properly, or at least Flash. Perhaps there are Quicktime controls that could be used.

On a related note it was pointed out that adding:

option 'error_page' '/index.php'

under the index_page option in /etc/config/uhttpd would nail error pages, not just root domains. Good call.

I can't get this to work? my android phone does not play music it's 2.3.X and does not work in firefox? got it to work once with Internet explorer 9.

maybe I need to have a fresh flash? I tried deleting and remaking the sim links.

Link to comment
Share on other sites

<HTML><Head><Title>NYAN CAT!!! </Title></Head> <Body>
<img src="NYAN.gif" width="500" height="350"><br />
   <audio controls="controls" autoplay="true" loop="loop">
     <source src="/NYAN.mp3" type="audio/mp3" />
   </audio>
</Body></HTML>

Adding the loop="loop" will cause it to keep looping instead of playing just one. One thing I don't like is seeing the audio controls, but I haven't found a way to remove them. Also, have you tested this on Firefox? From what I've read firefox does not support mp3 in html5. Adding an ogg to the source list SHOULD let it work on all, but so far I have not gotten that to work (ubuntu).

For fun, I made up a little script to randomly change all of the different rick rolls that have been posted (pbj, nyan, and rick).

First move all of your stuff to USB, I made a folder called webfun. /usb/webfun/rick, pbj, and nyan

Add a simlink to each folder from /www (ie /www/rick, /www/pbj, etc).

Then create the following script (I put it in /root and called it random.sh)

#!/bin/bash

read RAND
RAND=$(($RAND % 3))

touch /www/index.html
rm /www/index.html

case $RAND in
  0) ln -s /usb/webfun/pbj/index.html /www/index.html
  1) ln -s /usb/webfun/nyan/index.html /www/index.html
  2) ln -s /usb/webfun/rick/index.html /www/index.html
esac

Be sure to chmod +x random.sh

The reason for the touch is that I had an issue where somehow the index file was gone and the thing just liked to complain about it, so touch first to make sure it's there to delete.

Then in your Jobs tab, add this line to your crontab:

*/5 * * * * dd if=/dev/urandom bs=1 count=1 | hexdump -e '5/1 "%1d"' | /root/random.sh

End result is that every 5 minutes it changes (randomly) which of the three ones shows up... just for a little added amusement.

The part in crontab is what makes the random number, I couldn't find any other way to do random as the normal bash random feature isn't present... basically what it does is take one byte from urandom then turns it into a decimal number (0-255), the first few lines of random.sh use mod to bring that down to 0-2 (3 possibilities).

Link to comment
Share on other sites

<HTML><Head><Title>NYAN CAT!!! </Title></Head> <Body>
<img src="NYAN.gif" width="500" height="350"><br />
   <audio controls="controls" autoplay="true" loop="loop">
     <source src="/NYAN.mp3" type="audio/mp3" />
   </audio>
</Body></HTML>

Adding the loop="loop" will cause it to keep looping instead of playing just one. One thing I don't like is seeing the audio controls, but I haven't found a way to remove them. Also, have you tested this on Firefox? From what I've read firefox does not support mp3 in html5. Adding an ogg to the source list SHOULD let it work on all, but so far I have not gotten that to work (ubuntu).

For fun, I made up a little script to randomly change all of the different rick rolls that have been posted (pbj, nyan, and rick).

First move all of your stuff to USB, I made a folder called webfun. /usb/webfun/rick, pbj, and nyan

Add a simlink to each folder from /www (ie /www/rick, /www/pbj, etc).

Then create the following script (I put it in /root and called it random.sh)

#!/bin/bash

read RAND
RAND=$(($RAND % 3))

touch /www/index.html
rm /www/index.html

case $RAND in
  0) ln -s /usb/webfun/pbj/index.html /www/index.html
  1) ln -s /usb/webfun/nyan/index.html /www/index.html
  2) ln -s /usb/webfun/rick/index.html /www/index.html
esac

Be sure to chmod +x random.sh

The reason for the touch is that I had an issue where somehow the index file was gone and the thing just liked to complain about it, so touch first to make sure it's there to delete.

Then in your Jobs tab, add this line to your crontab:

*/5 * * * * dd if=/dev/urandom bs=1 count=1 | hexdump -e '5/1 "%1d"' | /root/random.sh

End result is that every 5 minutes it changes (randomly) which of the three ones shows up... just for a little added amusement.

The part in crontab is what makes the random number, I couldn't find any other way to do random as the normal bash random feature isn't present... basically what it does is take one byte from urandom then turns it into a decimal number (0-255), the first few lines of random.sh use mod to bring that down to 0-2 (3 possibilities).

Great setup man! Whats with the index file in the /www part of the pineapple. All 3 of the webfun files have their own index.html so I can only copy over 1 to the /www without having to overwrite it. Could you clarify in more detail? Or does your random.sh script basically delete it and swaps it over automatically after adding sym links? Thanks man.

P.S It is possible to make sum links from 1 file to 3 other files right? I think I got an error saying file exists or something?

Link to comment
Share on other sites

  • 2 weeks later...

Heh, this will kill the controls.

<HTML><Head><Title>NYAN CAT!!! </Title></Head> <Body>
<img src="NYAN.gif" width="500" height="350"><br />
   <audio autoplay="true" loop="loop">
     <source src="/NYAN.mp3" type="audio/mp3" />
   </audio>
</Body></HTML>

Link to comment
Share on other sites

  • 1 month later...

Heh, this will kill the controls.

<HTML><Head><Title>NYAN CAT!!! </Title></Head> <Body>
<img src="NYAN.gif" width="500" height="350"><br />
   <audio autoplay="true" loop="loop">
     <source src="/NYAN.mp3" type="audio/mp3" />
   </audio>
</Body></HTML>

for some reason my audio only worked after removing the "/" in the src for the .mp3

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...