Skip to content

Commit

Permalink
migrating to new domain, bye bye nothingprivate.ml 👋, ref: #140
Browse files Browse the repository at this point in the history
  • Loading branch information
gautamkrishnar committed Jul 21, 2023
1 parent 4f9a469 commit afb4320
Show file tree
Hide file tree
Showing 8 changed files with 5,180 additions and 32 deletions.
2 changes: 1 addition & 1 deletion CNAME
Original file line number Diff line number Diff line change
@@ -1 +1 @@
www.nothingprivate.ml
nothingprivate.gkr.pw
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This project is a proof of concept that any website can identify and track you,

## How to use the website

* Visit <http://www.nothingprivate.ml> and enter your name
* Visit <http://nothingprivate.gkr.pw> and enter your name
* Click the **"See the magic"** button
* Visit the same website in Private browsing / Incognito mode
* See the magic :star:
Expand Down
8 changes: 4 additions & 4 deletions cypress/integration/nothing-private.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ describe('Nothing Private e2e tests', function() {
// Test initial API Calls on page load
it('Initial page loading and API Calls', function() {
cy.server();
cy.route('GET', 'https://api.nothingprivate.ml/safedb.php*').as('safeDbAPI');
cy.route('GET', 'https://npvt-api.gkr.pw/safedb.php*').as('safeDbAPI');
cy.visit('http://localhost:8080');
cy.wait('@safeDbAPI');
cy.get('@safeDbAPI').should((xhr) => {
Expand All @@ -19,7 +19,7 @@ describe('Nothing Private e2e tests', function() {
cy.get('input#name').should('have.value', '');
cy.get('input.btn').should('have.value', 'See the magic!');
cy.server();
cy.route('https://api.nothingprivate.ml/safedb.php*').as('safeDbAPI');
cy.route('https://npvt-api.gkr.pw/safedb.php*').as('safeDbAPI');
cy.get('#name').type('cypress user').should('have.value', 'cypress user');
cy.get('input.btn').click();
cy.wait('@safeDbAPI');
Expand All @@ -33,7 +33,7 @@ describe('Nothing Private e2e tests', function() {
// Tests get fingerprint functionality
it('Functionality test: Refreshing the page, checks whether the fingerprint is detected', function() {
cy.server();
cy.route('GET', 'https://api.nothingprivate.ml/safedb.php*').as('safeDbAPI');
cy.route('GET', 'https://npvt-api.gkr.pw/safedb.php*').as('safeDbAPI');
cy.visit('http://localhost:8080');
cy.wait('@safeDbAPI');
cy.get('@safeDbAPI').should((xhr) => {
Expand All @@ -48,7 +48,7 @@ describe('Nothing Private e2e tests', function() {
// Tests forget fingerprint functionality
it('Functionality test: Clicking on "Forget me" button', function() {
cy.server();
cy.route('GET', 'https://api.nothingprivate.ml/forgetme.php*').as('forgetMeAPI');
cy.route('GET', 'https://npvt-api.gkr.pw/forgetme.php*').as('forgetMeAPI');
cy.get('input.btn').should('have.value', 'Forget Me!');
cy.get('input.btn').click();
cy.wait('@forgetMeAPI').should((xhr) => {
Expand Down
2 changes: 1 addition & 1 deletion db_server/index.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php header("Location: https://www.nothingprivate.ml/"); ?>
<?php header("Location: https://nothingprivate.gkr.pw/"); ?>
2 changes: 1 addition & 1 deletion docker/make_docker.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
sed -i 's/\"https:\/\/api.nothingprivate.ml\"/document.location.href + \"\db_server\"/g' /var/www/html/main.js
sed -i 's/\"https:\/\/npvt-api.gkr.pw\"/document.location.href + \"\db_server\"/g' /var/www/html/main.js
cd /var/www/html/db_server
php composer.phar install
22 changes: 11 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<!-- For changing icon when share on facebook.-->
<meta
property="og:image"
content="http://www.nothingprivate.ml/private.jpg"
content="http://nothingprivate.gkr.pw/private.jpg"
/>
<!-- favicon -->
<link rel="apple-touch-icon" sizes="57x57" href="favicon/apple-icon-57x57.png">
Expand Down Expand Up @@ -87,7 +87,7 @@ <h3>Loading... please wait...</h3>
<ul class="share-buttons">
<li>
<a
href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.nothingprivate.ml%2F&t=Nothing%20Private"
href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fnothingprivate.gkr.pw%2F&t=Nothing%20Private"
target="_blank"
><img
src="images/flat_web_icon_set/color/Facebook.png"
Expand All @@ -96,7 +96,7 @@ <h3>Loading... please wait...</h3>
</li>
<li>
<a
href="https://twitter.com/intent/tweet?source=http%3A%2F%2Fwww.nothingprivate.ml%2F&text=:%20http%3A%2F%2Fwww.nothingprivate.ml%2F"
href="https://twitter.com/intent/tweet?source=http%3A%2F%2Fnothingprivate.gkr.pw%2F&text=:%20http%3A%2F%2Fnothingprivate.gkr.pw%2F"
title="Tweet"
target="_blank"
onclick="window.open('https://twitter.com/intent/tweet?text=' + encodeURIComponent(document.title) + ':%20' + encodeURIComponent(document.URL)); return false;"
Expand All @@ -105,7 +105,7 @@ <h3>Loading... please wait...</h3>
</li>
<li>
<a
href="http://www.tumblr.com/share?v=3&u=http%3A%2F%2Fwww.nothingprivate.ml%2F&t=&s="
href="http://www.tumblr.com/share?v=3&u=http%3A%2F%2Fnothingprivate.gkr.pw%2F&t=&s="
title="Post to Tumblr"
target="_blank"
onclick="window.open('http://www.tumblr.com/share?v=3&u=' + encodeURIComponent(document.URL) + '&t=' + encodeURIComponent(document.title)); return false;"
Expand All @@ -116,7 +116,7 @@ <h3>Loading... please wait...</h3>
</li>
<li>
<a
href="http://pinterest.com/pin/create/button/?url=http%3A%2F%2Fwww.nothingprivate.ml%2F&description="
href="http://pinterest.com/pin/create/button/?url=http%3A%2F%2Fnothingprivate.gkr.pw%2F&description="
title="Pin it"
target="_blank"
onclick="window.open('http://pinterest.com/pin/create/button/?url=' + encodeURIComponent(document.URL) + '&description=' + encodeURIComponent(document.title)); return false;"
Expand All @@ -127,7 +127,7 @@ <h3>Loading... please wait...</h3>
</li>
<li>
<a
href="https://getpocket.com/save?url=http%3A%2F%2Fwww.nothingprivate.ml%2F&title="
href="https://getpocket.com/save?url=http%3A%2F%2Fnothingprivate.gkr.pw%2F&title="
title="Add to Pocket"
target="_blank"
onclick="window.open('https://getpocket.com/save?url=' + encodeURIComponent(document.URL) + '&title=' + encodeURIComponent(document.title)); return false;"
Expand All @@ -138,7 +138,7 @@ <h3>Loading... please wait...</h3>
</li>
<li>
<a
href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.nothingprivate.ml%2F&title="
href="http://www.reddit.com/submit?url=http%3A%2F%2Fnothingprivate.gkr.pw%2F&title="
title="Submit to Reddit"
target="_blank"
onclick="window.open('http://www.reddit.com/submit?url=' + encodeURIComponent(document.URL) + '&title=' + encodeURIComponent(document.title)); return false;"
Expand All @@ -149,7 +149,7 @@ <h3>Loading... please wait...</h3>
</li>
<li>
<a
href="http://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Fwww.nothingprivate.ml%2F&title=&summary=&source=http%3A%2F%2Fwww.nothingprivate.ml%2F"
href="http://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Fnothingprivate.gkr.pw%2F&title=&summary=&source=http%3A%2F%2Fnothingprivate.gkr.pw%2F"
title="Share on LinkedIn"
target="_blank"
onclick="window.open('http://www.linkedin.com/shareArticle?mini=true&url=' + encodeURIComponent(document.URL) + '&title=' + encodeURIComponent(document.title)); return false;"
Expand All @@ -160,7 +160,7 @@ <h3>Loading... please wait...</h3>
</li>
<li>
<a
href="http://wordpress.com/press-this.php?u=http%3A%2F%2Fwww.nothingprivate.ml%2F&t=&s="
href="http://wordpress.com/press-this.php?u=http%3A%2F%2Fnothingprivate.gkr.pw%2F&t=&s="
title="Publish on WordPress"
target="_blank"
onclick="window.open('http://wordpress.com/press-this.php?u=' + encodeURIComponent(document.URL) + '&t=' + encodeURIComponent(document.title)); return false;"
Expand All @@ -171,7 +171,7 @@ <h3>Loading... please wait...</h3>
</li>
<li>
<a
href="https://pinboard.in/popup_login/?url=http%3A%2F%2Fwww.nothingprivate.ml%2F&title=&description="
href="https://pinboard.in/popup_login/?url=http%3A%2F%2Fnothingprivate.gkr.pw%2F&title=&description="
title="Save to Pinboard"
target="_blank"
onclick="window.open('https://pinboard.in/popup_login/?url=' + encodeURIComponent(document.URL) + '&title=' + encodeURIComponent(document.title)); return false;"
Expand All @@ -182,7 +182,7 @@ <h3>Loading... please wait...</h3>
</li>
<li>
<a
href="mailto:?subject=&body=:%20http%3A%2F%2Fwww.nothingprivate.ml%2F"
href="mailto:?subject=&body=:%20http%3A%2F%2Fnothingprivate.gkr.pw%2F"
title="Send email"
target="_blank"
onclick="window.open('mailto:?subject=' + encodeURIComponent(document.title) + '&body=' + encodeURIComponent(document.URL)); return false;"
Expand Down
6 changes: 3 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*jshint sub:true*/
"use strict";

var API_ROOT = "https://api.nothingprivate.ml";
var API_ROOT = "https://npvt-api.gkr.pw";
var Fingerprint = ''; // global variable to save the fingerprint

/**
Expand Down Expand Up @@ -142,7 +142,7 @@ function htmlEncode(value) {
* @param name
*/
function renderSubmit(name) {
document.getElementById("maindiv").innerHTML = '<h3><b>Thank you, ' + htmlEncode(name) + '! </b> Let\'s see the magic... <br/><br/>Now open a <b>private browsing window</b> or <b>incognito window</b> on your browser and visit <b>www.nothingprivate.ml</b> to see the magic...</h3><br><br><input type="button" class="btn" onclick="this.disabled=true; forgetMe()" value="Forget Me!" /><br><br>';
document.getElementById("maindiv").innerHTML = '<h3><b>Thank you, ' + htmlEncode(name) + '! </b> Let\'s see the magic... <br/><br/>Now open a <b>private browsing window</b> or <b>incognito window</b> on your browser and visit <b>nothingprivate.gkr.pw</b> to see the magic...</h3><br><br><input type="button" class="btn" onclick="this.disabled=true; forgetMe()" value="Forget Me!" /><br><br>';

}

Expand All @@ -165,7 +165,7 @@ function reload() {
* Error handling code
*/
function errorHandler() {
document.getElementById("maindiv").innerHTML = '<h3><b>An API error occurred! Please try again.</b> <br/><br/>Please visit <a href="https://status.nothingprivate.ml/">status.nothingprivate.ml</a> for the checking the API Status. </h3><br><br><input type="button" class="btn" onclick="this.disabled=true; reload()" value="Retry" /><br><br>';
document.getElementById("maindiv").innerHTML = '<h3><b>An API error occurred! Please try again.</b> <br/> </h3><br><br><input type="button" class="btn" onclick="this.disabled=true; reload()" value="Retry" /><br><br>';
}


Expand Down
Loading

0 comments on commit afb4320

Please sign in to comment.