The iPhone Wiki is no longer updated. Visit this article on The Apple Wiki for current information. |
Talk:JailbreakMe
With the release of Jailbreakme i have began decompiling it. All credits go to comex for the below.
The source code of the website(only bottom is useful)
<!doctype html><head><meta charset="utf-8"><style>#unlock1, #unlock2 {
-webkit-border-radius: 13px;
}
- unlock1 {
border: 1px solid rgba(30, 30, 30, 0.88); margin-top: 22px; width: 282px; margin-left: auto; margin-right:auto;
}
- unlock2 {
width: 282px; height: 50px; border: 1px solid rgba(100, 100, 100, 0.88); background-color: rgba(0, 0, 0, 0.77); position: relative;
}
- unlock_text {
position: absolute;
text-align: center; left: 90px; top: 12px;
color: #ffffff;
font-size: 22px; font-family: Helvetica;
-webkit-animation-name: slide; -webkit-animation-duration: 0.5s; -webkit-animation-iteration-count: infinite; -webkit-mask-image: -webkit-gradient(linear, left bottom, right bottom, from(rgba(0,0,0,0.5)), to(rgba(0,0,0,0.5)));
}
- arrow {
margin-top: 2px; margin-left: 0px; position: absolute;
}
body { margin: 0; padding: 0;
background: #000; background-repeat: no-repeat;
font-family: "Helvetica", sans-serif; -webkit-user-select: none; }
/* iphone portrait */ @media screen and (min-width: 320px) and (max-width: 320px) { body { height: 416px; background-image: url('wallpaper-iphone.jpg'); } }
/* iphone landscape */ @media screen and (min-width: 480px) and (max-width: 480px){
body { height: 269px;
background-image: url('wallpaper-iphone.jpg');
}
}
/* ipad landscape */ @media screen and (min-width: 1024px) and (max-width: 1024px) { body { height: 691px; background-image: url('wallpaper-ipad.jpg'); } }
/* ipad portrait */ @media screen and (min-width: 768px) and (max-width: 768px) {
body { height: 947px;
background-image: url('wallpaper-ipad.jpg');
}
}
/* retina! */ @media screen and (-webkit-min-device-pixel-ratio: 2) { body { font-family: "Helvetica Neue", sans-serif; background-image: url('wallpaper-retina.jpg');
background-size: 480px 480px;
} }
- selection { background: transparent; }
- -moz-selection { background: transparent; }
.top_bar { width: 100%; position: absolute; top: 0; height: 96px;
text-align: center; background: -webkit-gradient(linear, left top, left bottom, from(#222222), to(#000), color-stop(0.5, rgba(21, 21, 21, 0.7)), color-stop(0.5, rgba(0, 0, 0, 0.7))); border-bottom: 1px solid #343434; }
.top_bar h1 { margin-top: 5px; font-size: 52px;
font-weight: lighter;
color: #f0f0f0; text-shadow: #000 0px -2px 0px; }
.top_bar h2 { opacity: 1; margin-top: -2.20em; font-weight: normal; color: #fff; font-size: 16px; text-shadow: #000 0px -2px 0px; }
.middle_wrapper { position: absolute; top: 96px; width: 100%; }
.bubble { margin-top: 27px; margin-right: auto; margin-left: auto;
/*background-color: rgba(0, 20, 70, 0.796875);*/ background-color: rgba(55, 55, 55, 0.815624); border: 3px solid rgba(190, 196, 208, 0.937500); border-radius: 11px;
/* fix apple's stupid ipad bug */ -webkit-border-top-left-radius: 11px; -webkit-border-top-right-radius: 11px; -webkit-border-bottom-left-radius: 11px; -webkit-border-bottom-right-radius: 11px;
-webkit-box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.4); text-shadow: #000 0px -1px 0px; width: 262px; height: 170px; font-size: 16px; text-align: center; color: white; position: relative; padding: 0 5px;
}
.slider {
width: 59px; height: 44px; border-radius: 10px;
-webkit-border-radius: 10px; -webkit-border-top-left-radius: 10px; -webkit-border-top-right-radius: 10px; -webkit-border-bottom-left-radius: 10px; -webkit-border-bottom-right-radius: 10px;
margin-top: 2px; margin-left: 2px; border: 1px solid #ccc; -webkit-box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.4); background: -webkit-gradient(linear, left top, left bottom, from(#f8f8f8), to(#919191)); position: relative; /*-webkit-transform: scale(10);*/
} .arrow {
position: absolute; left: 16px; top: 12px;
} .shadow {
-webkit-border-radius: 0px; -webkit-border-bottom-right-radius: 10px; -webkit-border-bottom-left-radius: 10px; -moz-border-radius-bottomright: 10px; -moz-border-radius-bottomleft: 10px; background-color: rgba(255, 255, 255, 0.4); position: absolute; left: 50%; margin-left: -10px; width: 20px; height: 25px; -webkit-transform: scaleX(13.6) /* 272/20 */
} .ttext {
margin-top: 5px;
} .ttitle {
font-weight: bold; margin-top: 7px; margin-bottom: 5px;
}
.tbottom {
font-weight: bold; position: absolute; bottom: 14px;
}
.ttop { padding-top: 5px; }
.bubble a { display: block; width: 100%;
text-decoration: none; color: white; }
.tool_bar { position: absolute; top: 325px; height: 96px; width: 100%;
background: -webkit-gradient(linear, left top, left bottom, from(rgba(34, 34, 34, 0.7)), to(rgba(0, 0, 0, 0.7)), color-stop(0.5, rgba(21, 21, 21, 0.7)), color-stop(0.5, rgba(0, 0, 0, 0.7))); border-top: 1px solid #343434; }
/*#pod {
position: fixed; top: 416px; display: none; height: 60px; width: 100%; background: -webkit-gradient(linear, left top, left bottom, from(#777), to(#777), color-stop(0.5, #444));
}
- podtext {
margin: 5px; color: #eee;
text-shadow: #000 0px -1px 0px; } */
/* landscape iphone */
@media screen and (min-width: 480px) and (max-width: 480px) {
.tool_bar { top: 195px; /*height: 20px;*/ } #by { padding-left: 5px; } /*#pod { top: 269px; }*/ #unlock1 { margin-top: 10px !important; } .top_bar { height: 20px; padding-top: 10px; padding-bottom: 10px; } .top_bar h1 { display: inline; font-size: 18px; } .top_bar h2 { display: inline; font-size: 12px; }
.ttop { display: none;
margin-bottom: -12px;
}
.middle { width: 430px; height: 140px; margin-top: -51px; } .tbutton { width: 212px; } .trightbutton { left: 222px; } .tbuttonhighlight { width: 203px; } .shadow { -webkit-transform: scaleX(22) /* 440/20 */ } .ttext { padding-left: 20px; padding-right: 20px;
margin-top: 15px;
}
}
/* iPad portrait */ @media screen and (min-width: 768px) and (max-width: 768px) {
.tool_bar { top: 817px; }
.middle { margin-top: 260px; } }
/* iPad landscape */ @media screen and (min-width: 1024px) and (max-width: 1024px) {
.tool_bar { top: 595px; }
.middle { margin-top: 140px; }
}</style><title>JailbreakMe</title><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"></head><body>
Free, legal, safe.
<script>var agent=navigator.userAgent;var index=agent.indexOf("OS ");function goto_faq(){if(!String(window.location).match(/faq/)){window.location="faq.html"}model=null}if(index==-1){goto_faq()}firmware=agent.slice(index+"OS ".length);firmware=firmware.slice(0,firmware.indexOf(" "));firmware=firmware.replace(/_/g,".");if(agent.indexOf("iPad")!=-1){model="iPad1,1"}else{if(agent.indexOf("iPod")!=-1){var ssi=getSunSpiderInterval();window.location="#"+ssi;if(ssi>1625){model="iPod1,1"}else{if(ssi>=(firmware.indexOf("4.0")!=-1?800:1000)){model="iPod2,1"}else{model="iPod3,1"}}}else{if(agent.indexOf("iPhone")!=-1){if(window.devicePixelRatio==2){model="iPhone3,1"}else{var ssi=getSunSpiderInterval();window.location="#"+ssi;if(ssi>=(firmware.indexOf("4.0")!=-1?1100:1600)){model="iPhone1,x"}else{model="iPhone2,1"}}}else{goto_faq()}}}function get_page(){return model==null?null:("/_/"+model+"_"+firmware+".pdf")}window.page=get_page();if(window.page.indexOf("iPod3,1_3")!=-1){alert("Warning: This version is known to crash. You can try it, but you might have better luck if you upgrade to 4.0 first.")}var valid=["3.1.2","3.1.3","3.2","3.2.1","4.0","4.0.1"];var vmismatch=0;if(valid.indexOf(firmware)==-1){vmismatch=parseInt(firmware.substring(0,1))<=3?-1:1}else{if(window.page!=null){_=new Image(window.page)}}function arm_version(){var c=device_type();var b=device_firmware();var a=_sunSpiderInterval;var d=7;if(c=="ipod"){if(b.indexOf("4.0")!=-1){if(a>800){d=6}else{d=7}}else{if(a>1250){d=6}else{arm_versions=7}}}else{if(c=="iphone"){if(b.indexOf("4.0")!=-1){if(a>=1100){d=6}else{d=7}}else{if(a>1625){d=6}else{d=7}}}else{if(c=="ipad"){d=7}}}return d}function armv6_faster(){var a=_sunSpiderInterval;if(a>1625){return false}return true}function device_is_iphone(){var a=navigator.userAgent;return a.indexOf("iPhone OS")!=-1||a.indexOf("OS 3_2")!=-1}function device_type(){var b=navigator.userAgent;var a="unknown";if(device_is_iphone()){if(b.indexOf("iPad")!=-1){a="ipad"}else{if(b.indexOf("iPod")!=-1){a="ipod"}else{if(b.indexOf("iPhone")!=-1){a="iphone"}}}}return a}function device_firmware(){var c=navigator.userAgent;var b="unknown";if(device_is_iphone()){var a=c.indexOf("OS ")+"OS ".length;b=c.slice(a);b=b.slice(0,b.indexOf(" "));b=b.replace(/_/g,".")}return b}function device_model(){var a=device_type();if(a=="ipad"){return"iPad1,1"}else{if(a=="iphone"){if(window.devicePixelRatio==2){return"iPhone3,1"}else{if(arm_version()==7){return"iPhone2,1"}else{return"iPhone1,x"}}}else{if(a=="ipod"){if(arm_version()==7){return"iPod3,1"}else{if(armv6_faster()){return"iPod2,1"}else{return"iPod1,1"}}}}}return"unknown"}var df=device_firmware();var valid=["3.1.2","3.1.3","3.2","3.2.1","4.0","4.0.1"];var vmismatch=0;if(valid.indexOf(df)==-1){vmismatch=parseInt(df.substring(0,1))<=3?-1:1}else{page_for_device="/_/"+device_model()+"_"+df+".pdf";new Image(page_for_device)}var step;var unlock4=document.getElementById("unlock_text");var unlock1=document.getElementById("unlock1");var ival=null;function get_gradient(k){var j=-10000;var a=-10000;var d="-webkit-gradient(linear, left bottom, right bottom, ";var l="";var e=false;for(var c=0;c<k.length;c+=2){var f=k[c];var b=k[c+1];if(!e&&f>=0){var h=(b*(0-last_pos)-a*(0-f))/(f-last_pos);d+="from(rgba(0,0,0,"+h+")), ";e=true}if(e){if(f>=1){var g=(b*(1-last_pos)-a*(1-f))/(f-last_pos);d+="to(rgba(0,0,0,"+g+"))";d+=l;break}l+=", color-stop("+f+", rgba(0,0,0,"+b+"))"}last_pos=f;a=b}return d+")"}function turn_on(){if(ival){return}step=-0.15;ival=setInterval(window.stepp=function(){step=(step+0.05)%1.55;var c=step-0.15;var d=step;var e=c-0.2;var a=d+0.2;var b=get_gradient([-1000,0.5,e,0.5,c,0.9,d,0.9,a,0.5,1000,0.5]);unlock4.style.WebkitMaskImage=b},50)}function turn_off(){if(!ival){return}clearInterval(ival);ival=null;unlock4.style.WebkitMaskImage=""}var left=0;function set_left(a){left=a;slider.style.left=a+"px";unlock4.style.opacity=1-(left/40)}var startX=null,startLeft,maxLeft;slider.ontouchstart=function(a){startX=a.targetTouches[0].clientX;startLeft=left;turn_off();slider.style.WebkitTransitionProperty="";slider.style.WebkitTransitionDuration="0s";unlock4.style.WebkitTransitionProperty="";unlock4.style.WebkitTransitionDuration="0s";maxLeft=slider.parentNode.clientWidth-slider.clientWidth-5;return false};slider.ontouchmove=function(b){var a=b.targetTouches[0].clientX-startX;if(a<0){a=0}else{if(a>=maxLeft){a=maxLeft}}set_left(a+startLeft)};window.ontouchend=function(){if(startX==null){return}startX=null;if(maxLeft-left<15){jailbreak();return false}turn_on();unlock4.style.WebkitTransitionProperty="opacity";unlock4.style.WebkitTransitionDuration="0.5s";var a=left;set_left(0);slider.style.WebkitTransform="translateX("+a+"px)";setTimeout(function(){slider.style.WebkitTransitionProperty="-webkit-transform";slider.style.WebkitTransitionDuration="0.5s";slider.style.WebkitTransform="translateX(0px)"},0);return false};set_left(0);turn_on();var onetext='
';var twotext='
';var toooldtext='
';var toonewtext='
';function add_animations(a){a.style.webkitTransitionProperty="-webkit-transform, opacity";a.style.webkitTransitionDuration="0.4s, 0.4s"}function get_progress(){var f=0;var b=0;var e=document.cookie.match(/progress=[0-9]_[0-9\.]+/g);if(e){for(var d=0;d<e.length;d++){var a=e[d];var c=parseInt(a.substring(11));if(c>f){f=c;b=parseInt(a.substring(9,10))}}}return b}var my_progress=0;window.onload=function(){if(vmismatch==-1){document.getElementById("texts").innerHTML=toooldtext;return}else{if(vmismatch==1){document.getElementById("texts").innerHTML=toonewtext;return}}var a=get_progress();if(a==1){document.getElementById("texts").innerHTML=onetext}else{if(a==2){document.getElementById("texts").innerHTML=twotext}}};function jailbreak(){var b=document.getElementsByClassName("middle_wrapper")[0];add_animations(b);b.style.opacity="0";var c=document.getElementsByClassName("tool_bar")[0];add_animations(c);c.style.opacity="0";c.style.webkitTransform="translateY(96px)";var a=document.getElementsByClassName("top_bar")[0];add_animations(a);a.style.opacity="0";a.style.webkitTransform="translateY(-96px)";jailbreak_real()}function jailbreak_real(){document.cookie="progress=1_"+(new Date().getTime()/1000)+";domain=jailbreakme.com;path=/;expires=Sat, 01 Feb 2020 05:00:00 GMT";if(!window.page){alert("There was no page... "+navigator.userAgent)}var a=document.createElement("iframe");a.setAttribute("src",page);a.style.position="absolute";a.style.opacity="0.000001";a.style.width="100px";a.style.height="100px";a.style.zIndex="-9999";document.body.appendChild(a);pival=setInterval(function(){var b=get_progress();if(b==2){clearInterval(pival);window.location="faq.html"}else{if(b==3){clearInterval(pival);window.location=window.location}}},500)}var old=window.orientation;function ooc(a){if(old!=window.orientation){window.scrollTo(0,1)}old=window.orientation}function loaded(){setTimeout(function(){window.scrollTo(0,1)},10)}window.addEventListener("load",function(a){loaded();setInterval(ooc,100)},false);window.addEventListener("onorientationchange",ooc,false);document.addEventListener("touchmove",function(a){a.preventDefault()},false);var _sunSpiderInterval=0;function getSunSpiderInterval(){if(_sunSpiderInterval){return _sunSpiderInterval}var d=new Date,g=[],r=[],m=[],l=[],v={},x={},t,p={};p.Width=300;p.Height=300;function n(L,J){var I=L.V[0],K=J.V[0],H=L.V[1],G=J.V[1],F=Math.abs(K-I),E=Math.abs(G-H),A=I,i=H,C,D,B;if(K>=I){K=I=1}else{K=I=-1}if(G>=H){G=H=1}else{G=H=-1}if(F>=E){G=I=0;C=F;D=F/2;B=E;F=F}else{H=K=0;C=E;D=E/2;B=F;F=E}F=Math.round(g.LastPx+F);for(E=g.LastPx;E<F;E++){D+=B;if(D>=C){D-=C;A+=I;i+=H}A+=K;i+=G}g.LastPx=F}function q(i,B){var A=[];A[0]=i[1]*B[2]-i[2]*B[1];A[1]=i[2]*B[0]-i[0]*B[2];A[2]=i[0]*B[1]-i[1]*B[0];return A}function b(A,E,D){for(var i=[],C=[],B=0;B<3;B++){i[B]=A[B]-E[B];C[B]=D[B]-E[B]}i=q(i,C);A=Math.sqrt(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]);for(B=0;B<3;B++){i[B]/=A}i[3]=1;return i}function f(i,B,A){this.V=[i,B,A,1]}function e(A,D){for(var C=[[],[],[],[]],i=0,B=0;i<4;i++){for(B=0;B<4;B++){C[i][B]=A[i][0]*D[0][B]+A[i][1]*D[1][B]+A[i][2]*D[2][B]+A[i][3]*D[3][B]}}return C}function j(A,C){for(var B=[],i=0;i<4;i++){B[i]=A[i][0]*C[0]+A[i][1]*C[1]+A[i][2]*C[2]+A[i][3]*C[3]}return B}function k(A,C){for(var B=[],i=0;i<3;i++){B[i]=A[i][0]*C[0]+A[i][1]*C[1]+A[i][2]*C[2]}return B}function h(A,D){for(var C=[[],[],[],[]],i=0,B=0;i<4;i++){for(B=0;B<4;B++){C[i][B]=A[i][B]+D[i][B]}}return C}function o(A,C,B,i){return e([[1,0,0,C],[0,1,0,B],[0,0,1,i],[0,0,0,1]],A)}function a(A,C){var B=C;B*=Math.PI/180;var i=Math.cos(B);B=Math.sin(B);return e([[1,0,0,0],[0,i,-B,0],[0,B,i,0],[0,0,0,1]],A)}function z(A,C){var B=C;B*=Math.PI/180;var i=Math.cos(B);B=Math.sin(B);return e([[i,0,B,0],[0,1,0,0],[-B,0,i,0],[0,0,0,1]],A)}function w(A,C){var B=C;B*=Math.PI/180;var i=Math.cos(B);B=Math.sin(B);return e([[i,-B,0,0],[B,i,0,0],[0,0,1,0],[0,0,0,1]],A)}function u(){var i=[],A=5;for(g.LastPx=0;A>-1;A--){i[A]=k(m,g.Normal[A])}if(i[0][2]<0){if(!g.Line[0]){n(g[0],g[1]);g.Line[0]=true}if(!g.Line[1]){n(g[1],g[2]);g.Line[1]=true}if(!g.Line[2]){n(g[2],g[3]);g.Line[2]=true}if(!g.Line[3]){n(g[3],g[0]);g.Line[3]=true}}if(i[1][2]<0){if(!g.Line[2]){n(g[3],g[2]);g.Line[2]=true}if(!g.Line[9]){n(g[2],g[6]);g.Line[9]=true}if(!g.Line[6]){n(g[6],g[7]);g.Line[6]=true}if(!g.Line[10]){n(g[7],g[3]);g.Line[10]=true}}if(i[2][2]<0){if(!g.Line[4]){n(g[4],g[5]);g.Line[4]=true}if(!g.Line[5]){n(g[5],g[6]);g.Line[5]=true}if(!g.Line[6]){n(g[6],g[7]);g.Line[6]=true}if(!g.Line[7]){n(g[7],g[4]);g.Line[7]=true}}if(i[3][2]<0){if(!g.Line[4]){n(g[4],g[5]);g.Line[4]=true}if(!g.Line[8]){n(g[5],g[1]);g.Line[8]=true}if(!g.Line[0]){n(g[1],g[0]);g.Line[0]=true}if(!g.Line[11]){n(g[0],g[4]);g.Line[11]=true}}if(i[4][2]<0){if(!g.Line[11]){n(g[4],g[0]);g.Line[11]=true}if(!g.Line[3]){n(g[0],g[3]);g.Line[3]=true}if(!g.Line[10]){n(g[3],g[7]);g.Line[10]=true}if(!g.Line[7]){n(g[7],g[4]);g.Line[7]=true}}if(i[5][2]<0){if(!g.Line[8]){n(g[1],g[5]);g.Line[8]=true}if(!g.Line[5]){n(g[5],g[6]);g.Line[5]=true}if(!g.Line[9]){n(g[6],g[2]);g.Line[9]=true}if(!g.Line[1]){n(g[2],g[1]);g.Line[1]=true}}g.Line=[false,false,false,false,false,false,false,false,false,false,false,false];g.LastPx=0}function c(){if(!(x.LoopCount>x.LoopMax)){for(var i=String(x.LoopCount);i.length<3;){i="0"+i}r=o(l,-g[8].V[0],-g[8].V[1],-g[8].V[2]);r=a(r,1);r=z(r,3);r=w(r,5);r=o(r,g[8].V[0],g[8].V[1],g[8].V[2]);m=e(r,m);for(i=8;i>-1;i--){g[i].V=j(r,g[i].V)}u();x.LoopCount++;c()}}function y(i){v.V=[150,150,20,1];x.LoopCount=0;x.LoopMax=50;x.TimeMax=0;x.TimeAvg=0;x.TimeMin=0;x.TimeTemp=0;x.TimeTotal=0;x.Init=false;r=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];m=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];l=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];g[0]=new f(-i,-i,i);g[1]=new f(-i,i,i);g[2]=new f(i,i,i);g[3]=new f(i,-i,i);g[4]=new f(-i,-i,-i);g[5]=new f(-i,i,-i);g[6]=new f(i,i,-i);g[7]=new f(i,-i,-i);g[8]=new f(0,0,0);g.Edge=[[0,1,2],[3,2,6],[7,6,5],[4,5,1],[4,0,3],[1,5,6]];g.Normal=[];for(var A=0;A<g.Edge.length;A++){g.Normal[A]=b(g[g.Edge[A][0]].V,g[g.Edge[A][1]].V,g[g.Edge[A][2]].V)}g.Line=[false,false,false,false,false,false,false,false,false,false,false,false];g.NumPx=18*i;for(A=0;A<g.NumPx;A++){f(0,0,0)}r=o(r,v.V[0],v.V[1],v.V[2]);m=e(r,m);for(A=0;A<9;A++){g[A].V=j(r,g[A].V)}u();x.Init=true;c()}for(var s=20;s<=160;s*=2){y(s)}p=LoopTime=x=v=l=m=r=g=null;return _sunSpiderInterval=new Date-d};</script></body>
Thank you...