2
0

Video and send-to-phone.

[ADDED]     Site: Demo video.
[ADDED]     Site: Send-to-phone using email and SMS.
This commit is contained in:
Maarten Billemont 2012-07-16 17:58:24 +02:00
parent 0a72809b02
commit 559e11b16e
12 changed files with 314 additions and 63 deletions

View File

@ -84,6 +84,50 @@
})(); })();
</script> </script>
<!-- jQuery -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<!-- Page JS -->
<script type="text/javascript">
$(document).ready(function() {
$(window).scroll(function() {
if ($(window).scrollTop() > 100) {
$(".appstore").show();
$("header .appstore").hide();
} else {
$(".appstore").hide();
$("header .appstore").show();
}
});
$(".tip.appstore").hide().delay(1000).fadeIn();
$(".tip.phone").hide();
$("#sendtophone").mouseenter(function() {
$(".tip.phone").fadeIn();
});
$("#sendtophone").mouseleave(function() {
$(".tip.phone").fadeOut();
});
$("#sendtophone").submit(function() {
$.ajax({
url: "http://masterpassword.lyndir.com/send.php",
data: {
destination: $(this).find("input[type='text']").val(),
},
cache: false,
});
goog_report_conversion('index-sendtophone');
_gaq.push(['_trackPageview', '/outbound/sendtophone']);
$("#sendtophone .field").hide();
$("#sendtophone .confirm").show();
return false;
});
$("#sendtophone .field").show();
$("#sendtophone .confirm").hide();
});
</script>
<!-- AdWords --> <!-- AdWords -->
<script type="text/javascript"> <script type="text/javascript">
/* <![CDATA[ */ /* <![CDATA[ */
@ -116,13 +160,25 @@
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
</head> </head>
<body> <body>
<a class="appstore" href="http://itunes.apple.com/app/id510296984" onclick="goog_report_conversion('index-fixed-header');_gaq.push(['_trackPageview', '/outbound/itunes']);"><img src="img/appstore.png" /></a> <a class="badge appstore" href="http://itunes.apple.com/app/id510296984" onclick="goog_report_conversion('index-fixed-header');_gaq.push(['_trackPageview', '/outbound/itunes']);"><img src="img/appstore.png" /></a>
<header> <header>
<a class="appstore" href="http://itunes.apple.com/app/id510296984" onclick="goog_report_conversion('index-top-header');_gaq.push(['_trackPageview', '/outbound/itunes']);"> <div class="badge appstore">
<span class="tip">Great feedback may earn you a free copy for a friend!</span> <a href="http://itunes.apple.com/app/id510296984" onclick="goog_report_conversion('index-top-header');_gaq.push(['_trackPageview', '/outbound/itunes']);">
<img src="img/appstore.png" /> <!--span class="tip appstore">Great feedback may earn you a free copy for a friend!</span-->
</a> <img src="img/appstore.png" />
</a><br />
<form id="sendtophone">
<span class="field">
Or send to your phone:<br />
<input type="text" name="email" placeholder="E-mail or phone number" />
<span class="tip phone">Phone needs country code (eg. +1 for US/CA, +44 for UK)</span>
</span>
<span class="confirm">
Message sent!
</span>
</form>
</div>
<h1><a href="."><img class="logo" src="img/iTunesArtwork-Bare.png" /> Master Password</a></h1> <h1><a href="."><img class="logo" src="img/iTunesArtwork-Bare.png" /> Master Password</a></h1>
<div class="footnote"><a href="mailto:masterpassword+remove_this@lyndir.com" onclick="_gaq.push(['_trackPageview', '/outbound/mail']);">Contact</a> | <a href="http://www.lyndir.com" onclick="_gaq.push(['_trackPageview', '/outbound/lyndir.com']);">Lyndir</a> | <a href="https://plus.google.com/116256327773442623984/about" rel="publisher" onclick="_gaq.push(['_trackPageview', '/outbound/google+']);">Google+</a></div> <div class="footnote"><a href="mailto:masterpassword+remove_this@lyndir.com" onclick="_gaq.push(['_trackPageview', '/outbound/mail']);">Contact</a> | <a href="http://www.lyndir.com" onclick="_gaq.push(['_trackPageview', '/outbound/lyndir.com']);">Lyndir</a> | <a href="https://plus.google.com/116256327773442623984/about" rel="publisher" onclick="_gaq.push(['_trackPageview', '/outbound/google+']);">Google+</a></div>
<div class="divider"></div> <div class="divider"></div>

View File

@ -1,5 +1,6 @@
html { html {
background: url("../img/back2-light.png") center 0; background: url("../img/back2-light.png") center 0;
height: 100%;
} }
body { body {
padding: 0; padding: 0;
@ -9,6 +10,8 @@ body {
font: 105% "Hoefler Text", Garamond, Baskerville, "Baskerville Old Face", "Times New Roman", serif; font: 105% "Hoefler Text", Garamond, Baskerville, "Baskerville Old Face", "Times New Roman", serif;
font-weight: 100; font-weight: 100;
height: 100%;
} }
h1, h2, h3, h4 { h1, h2, h3, h4 {
text-shadow: #FFF 0 -1px 1px, #AAA 0 0 5px; text-shadow: #FFF 0 -1px 1px, #AAA 0 0 5px;
@ -206,6 +209,15 @@ blockquote:before {
font-size: 300%; font-size: 300%;
font-weight: 100; font-weight: 100;
} }
#sendtophone input[type=text] {
border: 1px solid #666;
border-radius: 5px;
width: 15em;
-webkit-box-shadow: 0 0 5px #AAA;
-moz-box-shadow: 0 0 5px #AAA;
box-shadow: 0 0 5px #AAA;
}
/* Utilities */ /* Utilities */
.side { .side {
@ -226,11 +238,10 @@ blockquote:before {
position: relative; position: relative;
z-index: 1; z-index: 1;
} }
.appstore { .badge.appstore {
position: fixed; position: fixed;
display: none; display: none;
z-index: 100; z-index: 100;
font-size: 0;
/* appstore-bubble.png * /* appstore-bubble.png *
top: 8px; top: 8px;
@ -239,19 +250,22 @@ blockquote:before {
/* appstore.png */ /* appstore.png */
top: 25px; top: 25px;
right: 25px; right: 25px;
width: 200px;
text-align: center;
} }
.appstore img { .badge.appstore img {
border-radius: 5px; border-radius: 5px;
-webkit-box-shadow: 0 0 30px #AAA; -webkit-box-shadow: 0 0 30px #AAA;
-moz-box-shadow: 0 0 30px #AAA; -moz-box-shadow: 0 0 30px #AAA;
box-shadow: 0 0 30px #AAA; box-shadow: 0 0 30px #AAA;
} }
.appstore:hover img { .badge.appstore:hover img {
-webkit-box-shadow: 0 0 30px #FFF; -webkit-box-shadow: 0 0 30px #FFF;
-moz-box-shadow: 0 0 30px #FFF; -moz-box-shadow: 0 0 30px #FFF;
box-shadow: 0 0 30px #FFF; box-shadow: 0 0 30px #FFF;
} }
header .appstore { header .badge.appstore {
position: absolute; position: absolute;
display: block; display: block;
@ -259,16 +273,18 @@ header .appstore {
/* appstore-bubble.png * /* appstore-bubble.png *
bottom: -73px; bottom: -73px;
*/ */
/* appstore.png */ /* appstore.png
bottom: -25px; bottom: -25px;
*/
top: 125px;
} }
.tip { .tip {
background: url("../img/tip.png") no-repeat; background: url("../img/tip-above.png") no-repeat;
color: white; color: white;
position: absolute; position: absolute;
display: block; display: block;
right: 0; right: 65px;
width: 410px; width: 410px;
height: 60px; height: 60px;
padding: 12px 20px; padding: 12px 20px;
@ -280,6 +296,11 @@ header .appstore {
font: 14px "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", "Liberation Sans", sans-serif; font: 14px "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", "Liberation Sans", sans-serif;
} }
.tip.phone {
background: url("../img/tip-below.png") no-repeat;
padding: 23px 20px;
margin-top: 0px;
}
.badge { .badge {
position: absolute; position: absolute;
right: 20px; right: 20px;
@ -380,12 +401,19 @@ a.next:after {
width: 184px; width: 184px;
height: 184px; height: 184px;
} }
#frontpage .heading {
height: 100% !important;
padding-top: 100px;
}
#frontpage #about {
padding-top: 4em;
}
#frontpage .sidebox { #frontpage .sidebox {
background-position: center 397px; background-position: center 397px;
margin-right: -100px; margin-right: -100px;
} }
#frontpage .sidebox .clip { #frontpage .sidebox .clip {
height: 416px; height: 416px;
margin-bottom: 84px; margin-bottom: 2em;
} }

BIN
Site/img/arrow-down.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
Site/img/tip-below.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -72,10 +72,6 @@
<!-- jQuery --> <!-- jQuery -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<!-- Nivo Slider -->
<link rel="stylesheet" href="js/nivo-slider/nivo-slider.css" type="text/css" media="screen" />
<script src="js/nivo-slider/jquery.nivo.slider.pack.js" type="text/javascript"></script>
<!-- Page JS --> <!-- Page JS -->
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() { $(document).ready(function() {
@ -88,7 +84,32 @@
$("header .appstore").show(); $("header .appstore").show();
} }
}); });
$("header .appstore .tip").hide().delay(1000).fadeIn(); $(".tip.appstore").hide().delay(1000).fadeIn();
$(".tip.phone").hide();
$("#sendtophone").mouseenter(function() {
$(".tip.phone").fadeIn();
});
$("#sendtophone").mouseleave(function() {
$(".tip.phone").fadeOut();
});
$("#sendtophone").submit(function() {
$.ajax({
url: "http://masterpassword.lyndir.com/send.php",
data: {
destination: $(this).find("input[type='text']").val(),
},
cache: false,
});
goog_report_conversion('index-sendtophone');
_gaq.push(['_trackPageview', '/outbound/sendtophone']);
$("#sendtophone .field").hide();
$("#sendtophone .confirm").show();
return false;
});
$("#sendtophone .field").show();
$("#sendtophone .confirm").hide();
}); });
</script> </script>
@ -126,13 +147,25 @@
</head> </head>
<body id="frontpage" itemscope itemtype="http://schema.org/MobileSoftwareApplication"> <body id="frontpage" itemscope itemtype="http://schema.org/MobileSoftwareApplication">
<a class="appstore" href="http://itunes.apple.com/app/id510296984" onclick="goog_report_conversion('index-fixed-header');_gaq.push(['_trackPageview', '/outbound/itunes']);"><img src="img/appstore.png" /></a> <a class="badge appstore" href="http://itunes.apple.com/app/id510296984" onclick="goog_report_conversion('index-fixed-header');_gaq.push(['_trackPageview', '/outbound/itunes']);"><img src="img/appstore.png" /></a>
<header> <header>
<a class="appstore" href="http://itunes.apple.com/app/id510296984" onclick="goog_report_conversion('index-top-header');_gaq.push(['_trackPageview', '/outbound/itunes']);"> <div class="badge appstore">
<span class="tip">Great feedback may earn you a free copy for a friend!</span> <a href="http://itunes.apple.com/app/id510296984" onclick="goog_report_conversion('index-top-header');_gaq.push(['_trackPageview', '/outbound/itunes']);">
<img src="img/appstore.png" /> <!--span class="tip appstore">Great feedback may earn you a free copy for a friend!</span-->
</a> <img src="img/appstore.png" />
</a><br />
<form id="sendtophone">
<span class="field">
Or send to your phone:<br />
<input type="text" name="email" placeholder="E-mail or phone number" />
<span class="tip phone">Phone needs country code (eg. +1 for US/CA, +44 for UK)</span>
</span>
<span class="confirm">
Message sent!
</span>
</form>
</div>
<h1><a href="."><img class="logo" src="img/iTunesArtwork-Bare.png" /> Master Password</a></h1> <h1><a href="."><img class="logo" src="img/iTunesArtwork-Bare.png" /> Master Password</a></h1>
<div class="footnote"><a href="mailto:masterpassword+remove_this@lyndir.com" onclick="_gaq.push(['_trackPageview', '/outbound/mail']);">Contact</a> | <a href="http://www.lyndir.com" onclick="_gaq.push(['_trackPageview', '/outbound/lyndir.com']);">Lyndir</a> | <a href="https://plus.google.com/116256327773442623984/about" rel="publisher" onclick="_gaq.push(['_trackPageview', '/outbound/google+']);">Google+</a></div> <div class="footnote"><a href="mailto:masterpassword+remove_this@lyndir.com" onclick="_gaq.push(['_trackPageview', '/outbound/mail']);">Contact</a> | <a href="http://www.lyndir.com" onclick="_gaq.push(['_trackPageview', '/outbound/lyndir.com']);">Lyndir</a> | <a href="https://plus.google.com/116256327773442623984/about" rel="publisher" onclick="_gaq.push(['_trackPageview', '/outbound/google+']);">Google+</a></div>
<div class="divider"></div> <div class="divider"></div>
@ -143,24 +176,21 @@
</div> </div>
<!--a href="http://bit.ly/vNN5Zi" onclick="_gaq.push(['_trackPageview', '/outbound/testflight']);" id="ribbon"></a--> <!--a href="http://bit.ly/vNN5Zi" onclick="_gaq.push(['_trackPageview', '/outbound/testflight']);" id="ribbon"></a-->
<!--section class="heading"> <section class="heading">
<div> <div class="center">
<div class="slider-wrapper"> <div class="box effect-8">
<div id="slider" class="nivoSlider"> <!--iframe id="ytplayer" type="text/html" width="640" height="360" frameborder="0"
<img src="images/slide1.jpg" alt="" /> src="http://www.youtube.com/embed/QTfA0O7YnHQ?origin=http://masterpassword.lyndir.com&autohide=1&autoplay=0&rel=0&showinfo=0&theme=light&color=white"></iframe-->
<a href="http://dev7studios.com"><img src="images/slide2.jpg" alt="" title="#htmlcaption" /></a> <iframe width="640" height="360" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen
<img src="images/slide3.jpg" alt="" title="This is an example of a caption" /> src="http://player.vimeo.com/video/45803664?title=0&amp;byline=0&amp;portrait=0&amp;color=ffffff"></iframe>
<img src="images/slide4.jpg" alt="" />
</div>
</div>
<div id="htmlcaption" class="nivo-html-caption">
<strong>This</strong> is an example of a <em>HTML</em> caption with <a href="#">a link</a>.
</div> </div>
<h1><a href="#about" onclick="_gaq.push(['_trackPageview', '/anchor/about']);"><img src="img/arrow-down.png" height="100" /></a></h1>
</div> </div>
</section--> </section>
<section class="heading"> <section id="about">
<div> <div>
<div class="sidebox"> <div class="sidebox">
<div class="clip" itemprop="offers" itemscope itemtype="http://schema.org/Offer"> <div class="clip" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
@ -204,16 +234,11 @@
<p>Built on algorithms such as <a href="http://www.bsdcan.org/2009/schedule/events/147.en.html" onclick="_gaq.push(['_trackPageview', '/outbound/scrypt']);">scrypt</a> and <a href="http://en.wikipedia.org/wiki/HMAC" onclick="_gaq.push(['_trackPageview', '/outbound/HMAC']);">HMAC-SHA256</a>, your master password is kept safe even if websites you use get hacked.</p> <p>Built on algorithms such as <a href="http://www.bsdcan.org/2009/schedule/events/147.en.html" onclick="_gaq.push(['_trackPageview', '/outbound/scrypt']);">scrypt</a> and <a href="http://en.wikipedia.org/wiki/HMAC" onclick="_gaq.push(['_trackPageview', '/outbound/HMAC']);">HMAC-SHA256</a>, your master password is kept safe even if websites you use get hacked.</p>
<p>As to prove a point, <a href="http://www.washingtonpost.com/business/technology/linkedin-eharmony-deal-with-breach-aftermath/2012/06/07/gJQAwqs5KV_story.html" onclick="_gaq.push(['_trackPageview', '/outbound/linkedin-breach']);"><strong>LinkedIn</strong>, <strong>eHarmony</strong></a>, and <a href="http://securitywatch.pcmag.com/none/298865-last-fm-joins-eharmony-linkedin-to-celebrate-breach-week" onclick="_gaq.push(['_trackPageview', '/outbound/lastfm-breach']);"><strong>Last.FM</strong></a> have announced breaches that compromise millions of passwords in the past month alone. These breaches have leaked "<em>hashes</em>" of people's passwords, which make it trivial for attackers to find out the actual passwords <em>if they're not secure enough</em>.</p> <p>As to prove a point, <a href="http://www.washingtonpost.com/business/technology/linkedin-eharmony-deal-with-breach-aftermath/2012/06/07/gJQAwqs5KV_story.html" onclick="_gaq.push(['_trackPageview', '/outbound/linkedin-breach']);"><strong>LinkedIn</strong>, <strong>eHarmony</strong></a>, <a href="http://securitywatch.pcmag.com/none/298865-last-fm-joins-eharmony-linkedin-to-celebrate-breach-week" onclick="_gaq.push(['_trackPageview', '/outbound/lastfm-breach']);"><strong>Last.FM</strong></a> and <a href="http://www.switchfast.com/switchfast-blog/2012/7/13/latest-password-leak-affects-yahoo,-gmail,-and-aol-users.aspx" onclick="_gaq.push(['_trackPageview', '/outbound/yahoo-breach']);"><strong>Yahoo!</strong></a> have announced breaches that compromise millions of passwords in the past few months alone. These breaches usually leak "<em>hashes</em>" of people's passwords, which make it trivial for attackers to find out the actual passwords <em>if they're not secure enough</em>.</p>
<hr class="clear" /> <hr class="clear" />
<!--p>
Using Master Password, you will <strong>remember <em>only one</em> secure password</strong> and use that with the application to <strong>generate <em>any</em> password you might need</strong>: sites, email addresses, gaming accounts, or even your bike lock.<br />
Today, it's time to <em>stop worrying</em> about our passwords and get on with what we need to get done.
</p-->
<a name="how"></a> <div class="columns" id="how">
<div class="columns">
<div> <div>
<div class="columnhead"> <div class="columnhead">
<div class="box effect-7"> <div class="box effect-7">
@ -315,12 +340,6 @@
</section> </section>
<span itemprop="author" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Lyndir" />
<meta itemprop="url" content="http://www.lyndir.com" />
</span>
</span>
<footer> <footer>
Master Password is a security and productivity product by <a href="http://www.lyndir.com" rel="author" onclick="_gaq.push(['_trackPageview', '/outbound/lyndir.com']);">Lyndir</a>, &copy; 2011. Master Password is a security and productivity product by <a href="http://www.lyndir.com" rel="author" onclick="_gaq.push(['_trackPageview', '/outbound/lyndir.com']);">Lyndir</a>, &copy; 2011.
</footer> </footer>

0
Site/rate-limit/.keep Normal file
View File

79
Site/send.php Normal file
View File

@ -0,0 +1,79 @@
<?php
//==================================== Simple PHP code sample ==========================================//
header('Content-Type: text/plain;');
$countryToCC = array(
"AC" => 247, "AD" => 376, "AE" => 971, "AF" => 93, "AG" => 1, "AI" => 1, "AL" => 355, "AM" => 374, "AO" => 244, "AQ" => 672, "AR" => 54, "AS" => 1, "AT" => 43, "AU" => 61, "AW" => 297, "AX" => 358, "AZ" => 994, "BA" => 387, "BB" => 1, "BD" => 880, "BE" => 32, "BF" => 226, "BG" => 359, "BH" => 973, "BI" => 257, "BJ" => 229, "BL" => 590, "BM" => 1, "BN" => 673, "BO" => 591, "BQ" => 599, "BR" => 55, "BS" => 1, "BT" => 975, "BW" => 267, "BY" => 375, "BZ" => 501, "CA" => 1, "CC" => 61, "CD" => 243, "CF" => 236, "CG" => 242, "CH" => 41, "CI" => 225, "CK" => 682, "CL" => 56, "CM" => 237, "CN" => 86, "CO" => 57, "CR" => 506, "CU" => 53, "CV" => 238, "CW" => 599, "CX" => 61, "CY" => 357, "CZ" => 420, "DE" => 49, "DJ" => 253,
"DK" => 45, "DM" => 1, "DO" => 1, "DZ" => 213, "EC" => 593, "EE" => 372, "EG" => 20, "EH" => 212, "ER" => 291, "ES" => 34, "ET" => 251, "EU" => 388, "FI" => 358, "FJ" => 679, "FK" => 500, "FM" => 691, "FO" => 298, "FR" => 33, "GA" => 241, "GB" => 44, "GD" => 1, "GE" => 995, "GF" => 594, "GG" => 44, "GH" => 233, "GI" => 350, "GL" => 299, "GM" => 220, "GN" => 224, "GP" => 590, "GQ" => 240, "GR" => 30, "GT" => 502, "GU" => 1, "GW" => 245, "GY" => 592, "HK" => 852, "HN" => 504, "HR" => 385, "HT" => 509, "HU" => 36, "ID" => 62, "IE" => 353, "IL" => 972, "IM" => 44, "IN" => 91, "IO" => 246, "IQ" => 964,
"IR" => 98, "IS" => 354, "IT" => 39, "JE" => 44, "JM" => 1, "JO" => 962, "JP" => 81, "KE" => 254, "KG" => 996, "KH" => 855, "KI" => 686, "KM" => 269, "KN" => 1, "KP" => 850, "KR" => 82, "KW" => 965, "KY" => 1, "KZ" => 7, "LA" => 856, "LB" => 961, "LC" => 1, "LI" => 423, "LK" => 94, "LR" => 231, "LS" => 266, "LT" => 370, "LU" => 352, "LV" => 371, "LY" => 218, "MA" => 212, "MC" => 377, "MD" => 373, "ME" => 382, "MF" => 590, "MG" => 261, "MH" => 692, "MK" => 389, "ML" => 223, "MM" => 95, "MN" => 976, "MO" => 853, "MP" => 1, "MQ" => 596, "MR" => 222, "MS" => 1, "MT" => 356, "MU" => 230, "MV" => 960, "MW" => 265, "MX" => 52, "MY" => 60, "MZ" => 258, "NA" => 264, "NC" => 687, "NE" => 227, "NF" => 672, "NG" => 234, "NI" => 505, "NL" => 31, "NO" => 47, "NP" => 977, "NR" => 674, "NU" => 683, "NZ" => 64, "OM" => 968, "PA" => 507, "PE" => 51, "PF" => 689, "PG" => 675, "PH" => 63, "PK" => 92, "PL" => 48, "PM" => 508, "PR" => 1,
"PS" => 970, "PT" => 351, "PW" => 680, "PY" => 595, "QA" => 974, "QN" => 374, "QS" => 252, "QY" => 90, "RE" => 262, "RO" => 40, "RS" => 381, "RU" => 7, "RW" => 250, "SA" => 966, "SB" => 677, "SC" => 248, "SD" => 249, "SE" => 46, "SG" => 65, "SH" => 290, "SI" => 386, "SJ" => 47, "SK" => 421, "SL" => 232, "SM" => 378, "SN" => 221, "SO" => 252, "SR" => 597, "SS" => 211, "ST" => 239, "SV" => 503, "SX" => 1, "SY" => 963, "SZ" => 268, "TA" => 290, "TC" => 1, "TD" => 235, "TG" => 228, "TH" => 66, "TJ" => 992, "TK" => 690, "TL" => 670, "TM" => 993, "TN" => 216, "TO" => 676, "TR" => 90, "TT" => 1, "TV" => 688, "TW" => 886, "TZ" => 255, "UA" => 380, "UG" => 256, "UK" => 44, "US" => 1, "UY" => 598, "UZ" => 998, "VA" => 379,
"VC" => 1, "VE" => 58, "VG" => 1, "VI" => 1, "VN" => 84, "VU" => 678, "WF" => 681, "WS" => 685, "XC" => 991, "XD" => 888, "XG" => 881, "XN" => 870, "XP" => 878, "XR" => 979, "XS" => 808, "XT" => 800, "XV" => 882, "XV" => 883, "YE" => 967, "YT" => 262, "ZA" => 27, "ZM" => 260, "ZW" => 263,
);
/*
* This example requires allow_url_fopen to be enabled in php.ini. If it is not enabled, file_get_contents()
* will return an empty result.
*
* We recommend that you use port 5567 instead of port 80, but your
* firewall will probably block access to this port (see FAQ for more
* details):
* $url = 'http://www.bulksms.co.uk:5567/eapi/submission/send_sms/2/2.0';
*
* Please note that this is only for illustrative purposes, we strongly recommend that you use our comprehensive example
*/
$host = $_SERVER['REMOTE_ADDR'];
$destination = trim($_REQUEST['destination']);
if (strpos($destination, '@') === FALSE) {
// MSISDN
print("phone: $destination\n");
$destination = preg_replace('/[^[:digit:]]/', '', $destination);
print("phone: $destination\n");
if (strpos($destination, '0') === 0) {
$country = file_get_contents('http://api.hostip.info/country.php?ip='.urlencode($host));
$countryCode = $countryToCC[$country];
if (empty($countryCode)) {
print("Can't internationalize destination.");
exit();
}
$destination = preg_replace('/^0+/', $countryCode, $destination);
print("phone: $destination\n");
}
}
// Rate-limit the destination.
$destinationFile = "rate-limit/".str_replace("/", "", $destination);
$lastSend = @file_get_contents($destinationFile);
if (!empty($lastSend) && time() - $lastSend < 3600) {
print("Rate-limited destination.");
exit();
}
// Rate-limit the host.
$hostFile = "rate-limit/".str_replace("/", "", $host);
$lastSend = @file_get_contents($hostFile);
if (!empty($lastSend) && time() - $lastSend < 3600) {
print("Rate-limited host.");
exit();
}
// Limit check passed, record new operation.
file_put_contents($destinationFile, time());
file_put_contents($hostFile, time());
if (strpos($destination, '@') === FALSE) {
// Send message as SMS.
$url = 'http://www.bulksms.co.uk/eapi/submission/send_sms/2/2.0';
$data = 'username='.urlencode('lhunath').'&password='.file_get_contents('send.sms.pw').'&message='.urlencode('Tap to install Master Password: http://itunes.apple.com/app/id510296984').'&msisdn='.urlencode($destination);
$params = array('http' => array(
'method' => 'POST',
'content' => $data,
'header' => 'Content-type:application/x-www-form-urlencoded',
));
print(file_get_contents($url, false, stream_context_create($params)));
print("Sent to $destination as SMS.");
} else {
mail($destination, 'Master Password', 'Tap to install Master Password: http://itunes.apple.com/app/id510296984', 'From: Master Password Website <masterpassword@lyndir.com>');
print("Sent to $destination as E-mail.");
}
?>

0
Site/send.sms.pw Normal file
View File

View File

@ -29,20 +29,31 @@
</script> </script>
</head> </head>
<body> <body>
<a class="appstore" href="http://itunes.apple.com/app/id510296984" onclick="goog_report_conversion('index-fixed-header');_gaq.push(['_trackPageview', '/outbound/itunes']);"><img src="img/appstore.png" /></a> <a class="badge appstore" href="http://itunes.apple.com/app/id510296984" onclick="goog_report_conversion('index-fixed-header');_gaq.push(['_trackPageview', '/outbound/itunes']);"><img src="img/appstore.png" /></a>
<header> <header>
<a class="appstore" href="http://itunes.apple.com/app/id510296984" onclick="goog_report_conversion('index-top-header');_gaq.push(['_trackPageview', '/outbound/itunes']);"> <div class="badge appstore">
<span class="tip">Great feedback may earn you a free copy for a friend!</span> <a href="http://itunes.apple.com/app/id510296984" onclick="goog_report_conversion('index-top-header');_gaq.push(['_trackPageview', '/outbound/itunes']);">
<img src="img/appstore.png" /> <!--span class="tip appstore">Great feedback may earn you a free copy for a friend!</span-->
</a> <img src="img/appstore.png" />
</a><br />
<form id="sendtophone">
<span class="field">
Or send to your phone:<br />
<input type="text" name="email" placeholder="E-mail or phone number" />
<span class="tip phone">Phone needs country code (eg. +1 for US/CA, +44 for UK)</span>
</span>
<span class="confirm">
Message sent!
</span>
</form>
</div>
<h1><a href="."><img class="logo" src="img/iTunesArtwork-Bare.png" /> Master Password</a></h1> <h1><a href="."><img class="logo" src="img/iTunesArtwork-Bare.png" /> Master Password</a></h1>
<div class="footnote"><a href="mailto:masterpassword+remove_this@lyndir.com" onclick="_gaq.push(['_trackPageview', '/outbound/mail']);">Contact</a> | <a href="http://www.lyndir.com" onclick="_gaq.push(['_trackPageview', '/outbound/lyndir.com']);">Lyndir</a> | <a href="https://plus.google.com/116256327773442623984/about" rel="publisher" onclick="_gaq.push(['_trackPageview', '/outbound/google+']);">Google+</a></div> <div class="footnote"><a href="mailto:masterpassword+remove_this@lyndir.com" onclick="_gaq.push(['_trackPageview', '/outbound/mail']);">Contact</a> | <a href="http://www.lyndir.com" onclick="_gaq.push(['_trackPageview', '/outbound/lyndir.com']);">Lyndir</a> | <a href="https://plus.google.com/116256327773442623984/about" rel="publisher" onclick="_gaq.push(['_trackPageview', '/outbound/google+']);">Google+</a></div>
<div class="divider"></div> <div class="divider"></div>
</header> </header>
<div id="fixedheader"> <div id="fixedheader">
<a class="appstore" href="http://itunes.apple.com/app/id510296984"><img src="img/appstore-small.png" /></a>
<h2><a href=".">Master Password</a></h2> <h2><a href=".">Master Password</a></h2>
</div> </div>
<!--a href="http://bit.ly/vNN5Zi" onclick="_gaq.push(['_trackPageview', '/outbound/testflight']);" id="ribbon"></a--> <!--a href="http://bit.ly/vNN5Zi" onclick="_gaq.push(['_trackPageview', '/outbound/testflight']);" id="ribbon"></a-->

View File

@ -2,4 +2,6 @@
set -e set -e
cd "${BASH_SOURCE[0]%/*}" cd "${BASH_SOURCE[0]%/*}"
nice rsync --partial --progress --delete --sparse --archive --no-owner --no-perms --no-group --chmod=ugo=rwX . masterpassword.lyndir.com:/usr/local/www/masterpassword.lyndir.com/htdocs/ nice rsync --partial --progress --delete --sparse --archive --no-owner --no-perms --no-group --chmod=ugo=rwX \
--exclude rate-limit \
. masterpassword.lyndir.com:/usr/local/www/masterpassword.lyndir.com/htdocs/

View File

@ -84,6 +84,50 @@
})(); })();
</script> </script>
<!-- jQuery -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<!-- Page JS -->
<script type="text/javascript">
$(document).ready(function() {
$(window).scroll(function() {
if ($(window).scrollTop() > 100) {
$(".appstore").show();
$("header .appstore").hide();
} else {
$(".appstore").hide();
$("header .appstore").show();
}
});
$(".tip.appstore").hide().delay(1000).fadeIn();
$(".tip.phone").hide();
$("#sendtophone").mouseenter(function() {
$(".tip.phone").fadeIn();
});
$("#sendtophone").mouseleave(function() {
$(".tip.phone").fadeOut();
});
$("#sendtophone").submit(function() {
$.ajax({
url: "http://masterpassword.lyndir.com/send.php",
data: {
destination: $(this).find("input[type='text']").val(),
},
cache: false,
});
goog_report_conversion('index-sendtophone');
_gaq.push(['_trackPageview', '/outbound/sendtophone']);
$("#sendtophone .field").hide();
$("#sendtophone .confirm").show();
return false;
});
$("#sendtophone .field").show();
$("#sendtophone .confirm").hide();
});
</script>
<!-- AdWords --> <!-- AdWords -->
<script type="text/javascript"> <script type="text/javascript">
/* <![CDATA[ */ /* <![CDATA[ */
@ -116,13 +160,25 @@
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
</head> </head>
<body> <body>
<a class="appstore" href="http://itunes.apple.com/app/id510296984" onclick="goog_report_conversion('index-fixed-header');_gaq.push(['_trackPageview', '/outbound/itunes']);"><img src="img/appstore.png" /></a> <a class="badge appstore" href="http://itunes.apple.com/app/id510296984" onclick="goog_report_conversion('index-fixed-header');_gaq.push(['_trackPageview', '/outbound/itunes']);"><img src="img/appstore.png" /></a>
<header> <header>
<a class="appstore" href="http://itunes.apple.com/app/id510296984" onclick="goog_report_conversion('index-top-header');_gaq.push(['_trackPageview', '/outbound/itunes']);"> <div class="badge appstore">
<span class="tip">Great feedback may earn you a free copy for a friend!</span> <a href="http://itunes.apple.com/app/id510296984" onclick="goog_report_conversion('index-top-header');_gaq.push(['_trackPageview', '/outbound/itunes']);">
<img src="img/appstore.png" /> <!--span class="tip appstore">Great feedback may earn you a free copy for a friend!</span-->
</a> <img src="img/appstore.png" />
</a><br />
<form id="sendtophone">
<span class="field">
Or send to your phone:<br />
<input type="text" name="email" placeholder="E-mail or phone number" />
<span class="tip phone">Phone needs country code (eg. +1 for US/CA, +44 for UK)</span>
</span>
<span class="confirm">
Message sent!
</span>
</form>
</div>
<h1><a href="."><img class="logo" src="img/iTunesArtwork-Bare.png" /> Master Password</a></h1> <h1><a href="."><img class="logo" src="img/iTunesArtwork-Bare.png" /> Master Password</a></h1>
<div class="footnote"><a href="mailto:masterpassword+remove_this@lyndir.com" onclick="_gaq.push(['_trackPageview', '/outbound/mail']);">Contact</a> | <a href="http://www.lyndir.com" onclick="_gaq.push(['_trackPageview', '/outbound/lyndir.com']);">Lyndir</a> | <a href="https://plus.google.com/116256327773442623984/about" rel="publisher" onclick="_gaq.push(['_trackPageview', '/outbound/google+']);">Google+</a></div> <div class="footnote"><a href="mailto:masterpassword+remove_this@lyndir.com" onclick="_gaq.push(['_trackPageview', '/outbound/mail']);">Contact</a> | <a href="http://www.lyndir.com" onclick="_gaq.push(['_trackPageview', '/outbound/lyndir.com']);">Lyndir</a> | <a href="https://plus.google.com/116256327773442623984/about" rel="publisher" onclick="_gaq.push(['_trackPageview', '/outbound/google+']);">Google+</a></div>
<div class="divider"></div> <div class="divider"></div>