elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Guía actualizada para evitar que un ransomware ataque tu empresa


+  Foro de elhacker.net
|-+  Programación
| |-+  Desarrollo Web
| | |-+  PHP (Moderador: #!drvy)
| | | |-+  alguien sabe como se hace este script ?
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: alguien sabe como se hace este script ?  (Leído 4,444 veces)
Weeken

Desconectado Desconectado

Mensajes: 291


piensa en gratis


Ver Perfil WWW
alguien sabe como se hace este script ?
« en: 2 Enero 2013, 07:15 am »

el popup esta en php solo contiene un iframe a la web q tiene la publicidad.

me pasaron la demo pero no se decifrarla algun capo es base de javascripts y los css  

demo

Código:
http://foro-vip.com/peliculas/11620-proteger-sus-links-recomendado.html


« Última modificación: 12 Mayo 2013, 19:33 pm por Weeken » En línea

Diabliyo


Desconectado Desconectado

Mensajes: 1.441


shell# _


Ver Perfil WWW
Re: alguien sabe como se hace este script ?
« Respuesta #1 en: 2 Enero 2013, 23:04 pm »

No entiendo cual es tu finalidad, si sabes programar y tienes un poco de sentido comun puedes dedusir como lo hace.

Paso 1 - Abres el popup (popup.php).
Paso 2 - popup.php carga un jquery o javascript (como lo desees) el anuncio despues de que se cumpla el tiempo de espera.

Si lo que quieres es copiar el codigo porque no tienes idea como se hace, entonces mencionalo.

Te comento que existen inconvenientes cuando se muestra publicidad, ya que programas como AdBlock impide se visualice publicidad en paginas, esto lo logra simplemente reduciendo a 0px en alto las capas CSS que tenga que ver con la palabra "publicidad" en cualquier idioma.

Saludos !


En línea

Weeken

Desconectado Desconectado

Mensajes: 291


piensa en gratis


Ver Perfil WWW
Re: alguien sabe como se hace este script ?
« Respuesta #2 en: 3 Enero 2013, 00:52 am »

bueno no se si esta bien  :huh:

Código
  1. function markit_img(h){
  2. if(h.selection!='' && h.selection.substring(0,7)=='http://'){
  3. h.replaceWith = '[img]' + h.selection + '[/img]\n';
  4. h.openWith = '';
  5. h.closeWith = '';
  6. }else{
  7. var msg = prompt('Insertar una imagen', 'http://');
  8. if(msg != null){
  9. h.replaceWith = '[img]' + msg + '[/img]\n';
  10. h.openWith = '';
  11. h.closeWith = '';
  12. }else{
  13. h.replaceWith = '';
  14. h.openWith = '';
  15. h.closeWith = '';
  16. }}}
  17. function markit_url(h){
  18. if(h.selection==''){
  19. var msg = prompt('Insertar URL', 'http://');
  20. if(msg != null){
  21. h.replaceWith = '[url]' + msg + '[/url]';
  22. h.openWith = '';
  23. h.closeWith = '';
  24. }else{
  25. h.replaceWith = '';
  26. h.openWith = '';
  27. h.closeWith = '';
  28. }
  29. }else if(h.selection.substring(0,7)=='http://' || h.selection.substring(0,8)=='https://' || h.selection.substring(0,6)=='ftp://'){
  30. h.replaceWith = '';
  31. h.openWith='[url]';
  32. h.closeWith='[/url]';
  33. }else{
  34. var msg = prompt('Insertar URL', 'http://');
  35. if(msg != null){
  36. h.replaceWith = '';
  37. h.openWith='[url=' + msg + ']';
  38. h.closeWith='[/url]';
  39. }else{
  40. h.replaceWith = '';
  41. h.openWith = '';
  42. h.closeWith = '';
  43. }
  44. }
  45. }
  46.  
  47. function markit_quote(h){
  48. if(h.selection==''){
  49. var msg = prompt('Insertar el texto que desea citar', '');
  50. if(msg != null){
  51. h.replaceWith = '[quote]' + msg + '[/quote]';
  52. h.openWith = '';
  53. h.closeWith = '';
  54. }else{
  55. h.replaceWith = '';
  56. h.openWith = '';
  57. h.closeWith = '';
  58. }
  59. }else{
  60. h.replaceWith = '';
  61. h.openWith='[quote]';
  62. h.closeWith='[/quote]';
  63. }
  64. }
  65.  
  66. function print_editor(){
  67. if($('#markItUp') && !$('#markItUpMarkItUp').length){
  68. $('#markItUp').markItUp(mySettings);
  69. $('#emoticons a').click(function(){
  70. emoticon = ' ' + $(this).attr("smile") + ' ';
  71. $.markItUp({ replaceWith:emoticon });
  72. return false;
  73. });
  74. }
  75.  
  76.  
  77. //EDITOR DE COMENTARIOS
  78. if($('#cuerpo_comment') && !$('#markItUpCuerpo_comment').length){
  79. $('#cuerpo_comment').markItUp(mySettings_cmt);
  80. $('#MapSmiles area').click(function(){
  81. emoticon = ' ' + $(this).attr("smile") + ' ';
  82. $.markItUp({ replaceWith:emoticon });
  83. return false;
  84. });
  85. }
  86. }
  87.  
  88.  
  89. var hexcase = 0;
  90. var b64pad  = "";
  91. var chrsz   = 8;
  92. function hex_sha1(s){return binb2hex(core_sha1(str2binb(s),s.length * chrsz));}
  93. function b64_sha1(s){return binb2b64(core_sha1(str2binb(s),s.length * chrsz));}
  94. function str_sha1(s){return binb2str(core_sha1(str2binb(s),s.length * chrsz));}
  95. function hex_hmac_sha1(key, data){ return binb2hex(core_hmac_sha1(key, data));}
  96. function b64_hmac_sha1(key, data){ return binb2b64(core_hmac_sha1(key, data));}
  97. function str_hmac_sha1(key, data){ return binb2str(core_hmac_sha1(key, data));}
  98. function sha1_vm_test(){return hex_sha1("abc") == "a9993e364706816aba3e25717850c26c9cd0d89d";}
  99. function core_sha1(x, len)
  100. { x[len >> 5] |= 0x80 << (24 - len % 32);
  101. x[((len + 64 >> 9) << 4) + 15] = len;
  102. var w = Array(80);
  103. var a =  1732584193;
  104. var b = -271733879;
  105. var c = -1732584194;
  106. var d =  271733878;
  107. var e = -1009589776;
  108.  
  109. for (var i = 0; i < x.length; i += 16)
  110. {
  111. var olda = a;
  112. var oldb = b;
  113. var oldc = c;
  114. var oldd = d;
  115. var olde = e;
  116.  
  117. for (var j = 0; j < 80; j++)
  118. {
  119. if (j < 16) w[j] = x[i + j];
  120. else w[j] = rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1);
  121. var t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)), safe_add(safe_add(e, w[j]), sha1_kt(j)));
  122. e = d;
  123. d = c;
  124. c = rol(b, 30);
  125. b = a;
  126. a = t;
  127. }
  128.  
  129. a = safe_add(a, olda);
  130. b = safe_add(b, oldb);
  131. c = safe_add(c, oldc);
  132. d = safe_add(d, oldd);
  133. e = safe_add(e, olde);
  134. }
  135. return Array(a, b, c, d, e);
  136. }
  137. if (typeof(document.getElementById) == "undefined")
  138. document.getElementById = function (id)
  139. {
  140. return document.all[id];
  141. }
  142.  
  143. else if (!window.XMLHttpRequest && window.ActiveXObject)
  144. window.XMLHttpRequest = function ()
  145. {
  146. return new ActiveXObject(navigator.userAgent.indexOf("MSIE 5") != -1 ? "Microsoft.XMLHTTP" : "MSXML2.XMLHTTP");
  147. };
  148.  
  149. if (typeof(document.forms) == "undefined")
  150. document.forms = document.getElementsByTagName("form");
  151. function getXMLDocument(url, callback)
  152. {
  153. if (!window.XMLHttpRequest)
  154. return false;
  155.  
  156. var myDoc = new XMLHttpRequest();
  157. if (typeof(callback) != "undefined")
  158. {
  159. myDoc.onreadystatechange = function ()
  160. {
  161. if (myDoc.readyState != 4)
  162. return;
  163.  
  164. if (myDoc.responseXML != null && myDoc.status == 200)
  165. callback(myDoc.responseXML);
  166. };
  167. }
  168. myDoc.open('GET', url, true);
  169. myDoc.send(null);
  170.  
  171. return true;
  172. }
  173. function sendXMLDocument(url, content, callback)
  174. {
  175. if (!window.XMLHttpRequest)
  176. return false;
  177.  
  178. var sendDoc = new window.XMLHttpRequest();
  179. if (typeof(callback) != "undefined")
  180. {
  181. sendDoc.onreadystatechange = function ()
  182. {
  183. if (sendDoc.readyState != 4)
  184. return;
  185.  
  186. if (sendDoc.responseXML != null && sendDoc.status == 200)
  187. callback(sendDoc.responseXML);
  188. else
  189. callback(false);
  190. };
  191. }
  192. sendDoc.open('POST', url, true);
  193. if (typeof(sendDoc.setRequestHeader) != "undefined")
  194. sendDoc.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
  195. sendDoc.send(content);
  196.  
  197. return true;
  198. }
  199.  
  200. function textToEntities(text)
  201. {
  202. var entities = "";
  203. for (var i = 0; i < text.length; i++)
  204. {
  205. if (text.charCodeAt(i) > 127)
  206. entities += "&#38;#" + text.charCodeAt(i) + ";";
  207. else
  208. entities += text.charAt(i);
  209. }
  210.  
  211. return entities;
  212. }
  213. function reqWin(desktopURL, alternateWidth, alternateHeight, noScrollbars)
  214. {
  215. if ((alternateWidth && self.screen.availWidth * 0.8 < alternateWidth) || (alternateHeight && self.screen.availHeight * 0.8 < alternateHeight))
  216. {
  217. noScrollbars = false;
  218. alternateWidth = Math.min(alternateWidth, self.screen.availWidth * 0.8);
  219. alternateHeight = Math.min(alternateHeight, self.screen.availHeight * 0.8);
  220. }
  221. else
  222. noScrollbars = typeof(noScrollbars) != "undefined" && noScrollbars == true;
  223.  
  224. window.open(desktopURL, 'requested_popup', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=' + (noScrollbars ? 'no' : 'yes') + ',width=' + (alternateWidth ? alternateWidth : 480) + ',height=' + (alternateHeight ? alternateHeight : 220) + ',resizable=no');
  225.  
  226. return false;
  227. }
  228.  
  229. function storeCaret(text)
  230. {
  231. if (typeof(text.createTextRange) != "undefined")
  232. text.caretPos = document.selection.createRange().duplicate();
  233. }
  234. function replaceText(text, textarea)
  235. {
  236. if (typeof(textarea.caretPos) != "undefined" && textarea.createTextRange)
  237. {
  238. var caretPos = textarea.caretPos;
  239.  
  240. caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
  241. caretPos.select();
  242. }
  243. else if (typeof(textarea.selectionStart) != "undefined")
  244. {
  245. var begin = textarea.value.substr(0, textarea.selectionStart);
  246. var end = textarea.value.substr(textarea.selectionEnd);
  247. var scrollPos = textarea.scrollTop;
  248.  
  249. textarea.value = begin + text + end;
  250.  
  251. if (textarea.setSelectionRange)
  252. {
  253. textarea.focus();
  254. textarea.setSelectionRange(begin.length + text.length, begin.length + text.length);
  255. }
  256. textarea.scrollTop = scrollPos;
  257. }
  258. else
  259. {
  260. textarea.value += text;
  261. textarea.focus(textarea.value.length - 1);
  262. }}
  263. function surroundText(text1, text2, textarea)
  264. {
  265. if (typeof(textarea.caretPos) != "undefined" && textarea.createTextRange)
  266. {
  267. var caretPos = textarea.caretPos, temp_length = caretPos.text.length;
  268.  
  269. caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text1 + caretPos.text + text2 + ' ' : text1 + caretPos.text + text2;
  270.  
  271. if (temp_length == 0)
  272. {
  273. caretPos.moveStart("character", -text2.length);
  274. caretPos.moveEnd("character", -text2.length);
  275. caretPos.select();
  276. }
  277. else
  278. textarea.focus(caretPos);
  279. }
  280. else if (typeof(textarea.selectionStart) != "undefined")
  281. {
  282. var begin = textarea.value.substr(0, textarea.selectionStart);
  283. var selection = textarea.value.substr(textarea.selectionStart, textarea.selectionEnd - textarea.selectionStart);
  284. var end = textarea.value.substr(textarea.selectionEnd);
  285. var newCursorPos = textarea.selectionStart;
  286. var scrollPos = textarea.scrollTop;
  287.  
  288. textarea.value = begin + text1 + selection + text2 + end;
  289.  
  290. if (textarea.setSelectionRange)
  291. {
  292. if (selection.length == 0)
  293. textarea.setSelectionRange(newCursorPos + text1.length, newCursorPos + text1.length);
  294. else
  295. textarea.setSelectionRange(newCursorPos, newCursorPos + text1.length + selection.length + text2.length);
  296. textarea.focus();
  297. }
  298. textarea.scrollTop = scrollPos;
  299. }
  300. else
  301. {
  302. textarea.value += text1 + text2;
  303. textarea.focus(textarea.value.length - 1);
  304. }
  305. }
  306. function isEmptyText(theField)
  307. {
  308. var theValue = theField.value;
  309. while (theValue.length > 0 && (theValue.charAt(0) == ' ' || theValue.charAt(0) == '\t'))
  310. theValue = theValue.substring(1, theValue.length);
  311. while (theValue.length > 0 && (theValue.charAt(theValue.length - 1) == ' ' || theValue.charAt(theValue.length - 1) == '\t'))
  312. theValue = theValue.substring(0, theValue.length - 1);
  313.  
  314. if (theValue == '')
  315. return true;
  316. else
  317. return false;
  318. }
  319. function submitonce(theform)
  320. {
  321. smf_formSubmitted = true;
  322. }
  323. function submitThisOnce(form)
  324. {
  325. if (navigator.userAgent.indexOf('AppleWebKit') != -1)
  326. return !smf_formSubmitted;
  327.  
  328. if (typeof(form.form) != "undefined")
  329. form = form.form;
  330.  
  331. for (var i = 0; i < form.length; i++)
  332. if (typeof(form[i]) != "undefined" && form[i].tagName.toLowerCase() == "textarea")
  333. form[i].readOnly = true;
  334.  
  335. return !smf_formSubmitted;
  336. }
  337.  
  338. function setInnerHTML(element, toValue)
  339. {
  340. if (typeof(element.innerHTML) != 'undefined')
  341. element.innerHTML = toValue;
  342. else
  343. {
  344. var range = document.createRange();
  345. range.selectNodeContents(element);
  346. range.deleteContents();
  347. element.appendChild(range.createContextualFragment(toValue));
  348. }
  349. }
  350. function setOuterHTML(element, toValue)
  351. {
  352. if (typeof(element.outerHTML) != 'undefined')
  353. element.outerHTML = toValue;
  354. else
  355. {
  356. var range = document.createRange();
  357. range.setStartBefore(element);
  358. element.parentNode.replaceChild(range.createContextualFragment(toValue), element);
  359. }
  360. }
  361. function getInnerHTML(element)
  362. {
  363. if (typeof(element.innerHTML) != 'undefined')
  364. return element.innerHTML;
  365. else
  366. {
  367. var returnStr = '';
  368. for (var i = 0; i < element.childNodes.length; i++)
  369. returnStr += getOuterHTML(element.childNodes[i]);
  370.  
  371. return returnStr;
  372. }
  373. }
  374.  
  375. function getOuterHTML(node)
  376. {
  377. if (typeof(node.outerHTML) != 'undefined')
  378. return node.outerHTML;
  379.  
  380. var str = '';
  381.  
  382. switch (node.nodeType)
  383. {
  384. case 1:
  385. str += '<' + node.nodeName;
  386.  
  387. for (var i = 0; i < node.attributes.length; i++)
  388. {
  389. if (node.attributes[i].nodeValue != null)
  390. str += ' ' + node.attributes[i].nodeName + '="' + node.attributes[i].nodeValue + '"';
  391. }
  392.  
  393. if (node.childNodes.length == 0 && in_array(node.nodeName.toLowerCase(), ['hr', 'input', 'img', 'link', 'meta', 'br']))
  394. str += ' />';
  395. else
  396. str += '>' + getInnerHTML(node) + '</' + node.nodeName + '>';
  397. break;
  398. case 3:
  399. str += node.nodeValue;
  400. break;
  401. case 4:
  402. str += '<![CDATA' + '[' + node.nodeValue + ']' + ']>';
  403. break;
  404. case 5:
  405. str += '&' + node.nodeName + ';';
  406. break;
  407. case 8:
  408. str += '<!--' + node.nodeValue + '-->';
  409. break;
  410. }
  411.  
  412. return str;
  413. }
  414. function in_array(variable, theArray)
  415. {
  416. for (var i = 0; i < theArray.length; i++)
  417. {
  418. if (theArray[i] == variable)
  419. return true;
  420. }
  421. return false;
  422. }
  423. function selectRadioByName(radioGroup, name)
  424. {
  425. if (typeof(radioGroup.length) == "undefined")
  426. return radioGroup.checked = true;
  427.  
  428. for (var i = 0; i < radioGroup.length; i++)
  429. {
  430. if (radioGroup[i].value == name)
  431. return radioGroup[i].checked = true;
  432. }
  433.  
  434. return false;
  435. }
  436. function invertAll(headerfield, checkform, mask)
  437. {
  438. for (var i = 0; i < checkform.length; i++)
  439. {
  440. if (typeof(checkform[i].name) == "undefined" || (typeof(mask) != "undefined" && checkform[i].name.substr(0, mask.length) != mask))
  441. continue;
  442.  
  443. if (!checkform[i].disabled)
  444. checkform[i].checked = headerfield.checked;
  445. }
  446. }
  447. var lastKeepAliveCheck = new Date().getTime();
  448. function smf_sessionKeepAlive()
  449. {
  450. var curTime = new Date().getTime();
  451. if (global.scripturl && curTime - lastKeepAliveCheck > 900000)
  452. {
  453. var tempImage = new Image();
  454. tempImage.src = global.scripturl + (global.scripturl.indexOf("?") == -1 ? "?" : "&") + "action=keepalive;" + curTime;
  455. lastKeepAliveCheck = curTime;
  456. }
  457.  
  458. window.setTimeout("smf_sessionKeepAlive();", 1200000);
  459. }
  460. window.setTimeout("smf_sessionKeepAlive();", 1200000);
  461. function smf_setThemeOption(option, value, theme, cur_session_id)
  462. {
  463. if (cur_session_id == null)
  464. cur_session_id = smf_session_id;
  465.  
  466. var tempImage = new Image();
  467. tempImage.src = global.scripturl + (global.scripturl.indexOf("?") == -1 ? "?" : "&") + "action=jsoption;var=" + option + ";val=" + value + ";sesc=" + cur_session_id + (theme == null ? "" : "&id=" + theme) + ";" + (new Date().getTime());
  468. }
  469.  
  470. function smf_avatarResize()
  471. {
  472. var possibleAvatars = document.getElementsByTagName ? document.getElementsByTagName("img") : document.all.tags("img");
  473.  
  474. for (var i = 0; i < possibleAvatars.length; i++)
  475. {
  476. if (possibleAvatars[i].className != "avatar")
  477. continue;
  478.  
  479. var tempAvatar = new Image();
  480. tempAvatar.src = possibleAvatars[i].src;
  481.  
  482. if (smf_avatarMaxWidth != 0 && tempAvatar.width > smf_avatarMaxWidth)
  483. {
  484. possibleAvatars[i].height = (smf_avatarMaxWidth * tempAvatar.height) / tempAvatar.width;
  485. possibleAvatars[i].width = smf_avatarMaxWidth;
  486. }
  487. else if (smf_avatarMaxHeight != 0 && tempAvatar.height > smf_avatarMaxHeight)
  488. {
  489. possibleAvatars[i].width = (smf_avatarMaxHeight * tempAvatar.width) / tempAvatar.height;
  490. possibleAvatars[i].height = smf_avatarMaxHeight;
  491. }
  492. else
  493. {
  494. possibleAvatars[i].width = tempAvatar.width;
  495. possibleAvatars[i].height = tempAvatar.height;
  496. }
  497. }
  498.  
  499. if (typeof(window_oldAvatarOnload) != "undefined" && window_oldAvatarOnload)
  500. {
  501. window_oldAvatarOnload();
  502. window_oldAvatarOnload = null;
  503. }
  504. }
  505.  
  506. function hashLoginPassword(doForm, cur_session_id)
  507. {
  508. if (cur_session_id == null)
  509. cur_session_id = smf_session_id;
  510.  
  511. if (typeof(hex_sha1) == "undefined")
  512. return;
  513. if (doForm.user.value.indexOf("@") != -1)
  514. return;
  515. if (typeof(window.opera) == "undefined")
  516. doForm.passwrd.autocomplete = "off";
  517.  
  518. doForm.hash_passwrd.value = hex_sha1(hex_sha1(doForm.user.value.php_to8bit().php_strtolower() + doForm.passwrd.value.php_to8bit()) + cur_session_id);
  519. if (navigator.userAgent.indexOf("Firefox/") != -1)
  520. doForm.passwrd.value = "";
  521. else
  522. doForm.passwrd.value = doForm.passwrd.value.replace(/./g, "*");
  523. }
  524.  
  525. function hashAdminPassword(doForm, username, cur_session_id)
  526. {
  527. if (cur_session_id == null)
  528. cur_session_id = smf_session_id;
  529.  
  530. if (typeof(hex_sha1) == "undefined")
  531. return;
  532.  
  533. doForm.admin_hash_pass.value = hex_sha1(hex_sha1(username.toLowerCase() + doForm.admin_pass.value) + cur_session_id);
  534. doForm.admin_pass.value = doForm.admin_pass.value.replace(/./g, "*");
  535. }
  536. function sha1_ft(t, b, c, d)
  537. {
  538. if (t < 20) return (b & c) | ((~b) & d);
  539. if (t < 40) return b ^ c ^ d;
  540. if (t < 60) return (b & c) | (b & d) | (c & d);
  541. return b ^ c ^ d;
  542. }
  543. function sha1_kt(t)
  544. {
  545. return (t < 20) ?  1518500249 : (t < 40) ?  1859775393 :
  546.       (t < 60) ? -1894007588 : -899497514;
  547. }
  548. function core_hmac_sha1(key, data)
  549. {
  550. var bkey = str2binb(key);
  551. if (bkey.length > 16) bkey = core_sha1(bkey, key.length * chrsz);
  552.  
  553. var ipad = Array(16), opad = Array(16);
  554. for (var i = 0; i < 16; i++)
  555. {
  556. ipad[i] = bkey[i] ^ 0x36363636;
  557. opad[i] = bkey[i] ^ 0x5C5C5C5C;
  558. }
  559.  
  560. var hash = core_sha1(ipad.concat(str2binb(data)), 512 + data.length * chrsz);
  561. return core_sha1(opad.concat(hash), 512 + 160);
  562. }
  563. function safe_add(x, y)
  564. {
  565. var lsw = (x & 0xFFFF) + (y & 0xFFFF);
  566. var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
  567. return (msw << 16) | (lsw & 0xFFFF);
  568. }
  569. function rol(num, cnt)
  570. {
  571. return (num << cnt) | (num >>> (32 - cnt));
  572. }
  573. function str2binb(str)
  574. {
  575. var bin = Array();
  576. var mask = (1 << chrsz) - 1;
  577. for (var i = 0; i < str.length * chrsz; i += chrsz)
  578. bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (24 - i%32);
  579. return bin;
  580. }
  581. function binb2str(bin)
  582. {
  583. var str = "";
  584. var mask = (1 << chrsz) - 1;
  585. for (var i = 0; i < bin.length * 32; i += chrsz)
  586. str += String.fromCharCode((bin[i>>5] >>> (24 - i%32)) & mask);
  587. return str;
  588. }
  589. function binb2hex(binarray)
  590. {
  591. var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
  592. var str = "";
  593. for (var i = 0; i < binarray.length * 4; i++)
  594. {
  595. str += hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8+4)) & 0xF) +
  596.       hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8  )) & 0xF);
  597. }
  598. return str;
  599. }
  600. function binb2b64(binarray)
  601. {
  602. var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  603. var str = "";
  604. for (var i = 0; i < binarray.length * 4; i += 3)
  605. {
  606. var triplet = (((binarray[i   >> 2] >> 8 * (3 -  i   %4)) & 0xFF) << 16)
  607.            | (((binarray[i+1 >> 2] >> 8 * (3 - (i+1)%4)) & 0xFF) << 8 )
  608.            |  ((binarray[i+2 >> 2] >> 8 * (3 - (i+2)%4)) & 0xFF);
  609. for (var j = 0; j < 4; j++)
  610. {
  611. if (i * 8 + j * 6 > binarray.length * 32) str += b64pad;
  612. else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F);
  613. }
  614. }
  615. return str;
  616. }
  617. String.prototype.php_strtr = function (sFrom, sTo) {
  618. return this.replace(new RegExp('[' + sFrom + ']', 'g'), function (sMatch) {
  619. return sTo.charAt(sFrom.indexOf(sMatch));
  620. });
  621. }
  622. String.prototype.php_strtolower = function () {
  623. return typeof(smf_iso_case_folding) != "undefined" && smf_iso_case_folding == true ? this.php_strtr(
  624. 'ABCDEFGHIJKLMNOPQRSTUVWXYZ\x8a\x8c\x8e\x9f\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde',
  625. 'abcdefghijklmnopqrstuvwxyz\x9a\x9c\x9e\xff\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe'
  626. ) : this.php_strtr('ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz');
  627. }
  628. String.prototype.php_to8bit = function () {
  629. if (smf_charset == 'UTF-8')
  630. {
  631. var n, sReturn = '';
  632.  
  633. for (var i = 0, iTextLen = this.length; i < iTextLen; i++)
  634. {
  635. n = this.charCodeAt(i);
  636. if (n < 128)
  637. sReturn += String.fromCharCode(n)
  638. else if (n < 2048)
  639. sReturn += String.fromCharCode(192 | n >> 6) + String.fromCharCode(128 | n & 63);
  640. else if (n < 65536)
  641. sReturn += String.fromCharCode(224 | n >> 12) + String.fromCharCode(128 | n >> 6 & 63) + String.fromCharCode(128 | n & 63);
  642. else
  643. sReturn += String.fromCharCode(240 | n >> 18) + String.fromCharCode(128 | n >> 12 & 63) + String.fromCharCode(128 | n >> 6 & 63) + String.fromCharCode(128 | n & 63);
  644. }
  645.  
  646. return sReturn;
  647. }
  648. else if (smf_charset == 'ISO-8859-2')
  649. {
  650. return this.php_strtr(
  651. '\u0104\u02d8\u0141\u013d\u026a\u0160\u015e\u0164\u0179\u017d\u017b\u0105\u02db\u0142\u013e\u015b\u02c7\u0161\u015f\u0165\u017a\u02dd\u017e\u017c\u0154\u0102\u0139\u0106\u010c\u0118\u011a\u010e\u0110\u0143\u0147\u0150\u0158\u016e\u0170\u0162\u0155\u0103\u013a\u0107\u010d\u0119\u011b\u010f\u0111\u0144\u0148\u0151\u0159\u016f\u0171\u0163\u02d9',
  652. '\xa1\xa2\xa3\xa5\xa6\xa9\xaa\xab\xac\xae\xaf\xb1\xb2\xb3\xb5\xb6\xb7\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc3\xc5\xc6\xc8\xca\xcc\xcf\xd0\xd1\xd2\xd5\xd8\xd9\xdc\xde\xe0\xe3\xe5\xe6\xe8\xea\xec\xef\xf0\xf1\xf2\xf5\xf8\xf9\xfb\xfe\xff'
  653. );
  654. }
  655. else if (smf_charset == 'ISO-8859-9')
  656. {
  657. return this.php_strtr(
  658. '\u011e\u0130\u015e\u011f\u0131\u015f',
  659. '\xd0\xdd\xde\xf0\xfd\xfe'
  660. );
  661. }
  662. else if (smf_charset == 'tis-620')
  663. {
  664. return this.php_strtr(
  665. '\u0e01\u0e02\u0e03\u0e04\u0e05\u0e06\u0e07\u0e08\u0e09\u0e0a\u0e0b\u0e0c\u0e0d\u0e0e\u0e0f\u0e10\u0e11\u0e12\u0e13\u0e14\u0e15\u0e16\u0e17\u0e18\u0e19\u0e1a\u0e1b\u0e1c\u0e1d\u0e1e\u0e1f\u0e20\u0e21\u0e22\u0e23\u0e24\u0e25\u0e26\u0e27\u0e28\u0e29\u0e2a\u0e2b\u0e2c\u0e2d\u0e2e\u0e2f\u0e30\u0e31\u0e32\u0e33\u0e34\u0e35\u0e36\u0e37\u0e38\u0e39\u0e3a\u0e3f\u0e40\u0e41\u0e42\u0e43\u0e44\u0e45\u0e46\u0e47\u0e48\u0e49\u0e4a\u0e4b\u0e4c\u0e4d\u0e4e\u0e4f\u0e50\u0e51\u0e52\u0e53\u0e54\u0e55\u0e56\u0e57\u0e58\u0e59\u0e5a\u0e5b',
  666. '\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb'
  667. );
  668. }
  669. else if (smf_charset == 'windows-1251')
  670. {
  671. return this.php_strtr(
  672. '\u0402\u0403\u201a\u0453\u201e\u2026\u2020\u2021\u20ac\u2030\u0409\u2039\u040a\u040c\u040b\u040f\u0452\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u2122\u0459\u203a\u045a\u045c\u045b\u045f\u040e\u045e\u0408\u0490\u0401\u0404\u0407\u0406\u0456\u0491\u0451\u2116\u0454\u0458\u0405\u0455\u0457\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f',
  673. '\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa1\xa2\xa3\xa5\xa8\xaa\xaf\xb2\xb3\xb4\xb8\xb9\xba\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff'
  674. );
  675. }
  676. else if (smf_charset == 'windows-1253')
  677. {
  678. return this.php_strtr(
  679. '\u20ac\u201a\u0192\u201e\u2026\u2020\u2021\u2030\u2039\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u2122\u203a\u0385\u0386\u2015\u0384\u0388\u0389\u038a\u038c\u038e\u038f\u0390\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9\u03aa\u03ab\u03ac\u03ad\u03ae\u03af\u03b0\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9\u03ca\u03cb\u03cc\u03cd\u03ce',
  680. '\x80\x82\x83\x84\x85\x86\x87\x89\x8b\x91\x92\x93\x94\x95\x96\x97\x99\x9b\xa1\xa2\xaf\xb4\xb8\xb9\xba\xbc\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe'
  681. );
  682. }
  683. else if (smf_charset == 'windows-1255')
  684. {
  685. return this.php_strtr(
  686. '\u20ac\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u2039\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u203a\u20aa\u00d7\u00f7\u05b0\u05b1\u05b2\u05b3\u05b4\u05b5\u05b6\u05b7\u05b8\u05b9\u05bb\u05bc\u05bd\u05be\u05bf\u05c0\u05c1\u05c2\u05c3\u05f0\u05f1\u05f2\u05f3\u05f4\u05d0\u05d1\u05d2\u05d3\u05d4\u05d5\u05d6\u05d7\u05d8\u05d9\u05da\u05db\u05dc\u05dd\u05de\u05df\u05e0\u05e1\u05e2\u05e3\u05e4\u05e5\u05e6\u05e7\u05e8\u05e9\u05ea\u200e\u200f',
  687. '\x80\x82\x83\x84\x85\x86\x87\x88\x89\x8b\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9b\xa4\xaa\xba\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfd\xfe'
  688. );
  689. }
  690. else if (smf_charset == 'windows-1256')
  691. {
  692. return this.php_strtr(
  693. '\u20ac\u067e\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0679\u2039\u0152\u0686\u0698\u0688\u06af\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u06a9\u2122\u0691\u203a\u0153\u200c\u200d\u06ba\u060c\u06be\u061b\u061f\u06c1\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062a\u062b\u062c\u062d\u062e\u062f\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063a\u0640\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064a\u064b\u064c\u064d\u064e\u064f\u0650\u0651\u0652\u200e\u200f\u06d2',
  694. '\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa1\xaa\xba\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe1\xe3\xe4\xe5\xe6\xec\xed\xf0\xf1\xf2\xf3\xf5\xf6\xf8\xfa\xfd\xfe\xff'
  695. );
  696. }else return this;}
  697. function createXMLHttpRequest(){ var xmlhttp = null;
  698.    try {xmlhttp = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");} catch (e) {
  699.        alert("Il tuo browser o navigatore non supporta questo sistema, Deluzzo! ti consiglia di usare Firefox (http://www.mozilla-europe.org/it/firefox/)");
  700.    }
  701.    return xmlhttp;}
  702. var xhr = createXMLHttpRequest();
  703.  
  704.  
  705.  
  706.  
  707. $(document).ready(function(){
  708. print_editor();
  709. });
  710.  
  711.  
  712.  
  713.  
  714.  
  715. $(function(){
  716. print_editor();
  717. $('#rank_post ul li a').tipsy({gravity:'e'});
  718. $('#rank_puntos ul li a').tipsy({gravity:'e'});
  719.  
  720. /* Tipsy text urls */
  721. $('#tipsy_top a').tipsy({gravity:'s'});
  722. $('#tipsy_right a').tipsy({fade: true,gravity:'w'});
  723. $('#tipsy_left a').tipsy({fade: true,gravity:'e'});
  724. $('#tipsy_bottom a').tipsy({fade: true,gravity:'n'});
  725. /* Tipsy text normal */
  726. $('#tipsy_topn').tipsy({fade: true,gravity:'s'});
  727. $('#tipsy_rightn').tipsy({fade: true,gravity:'w'});
  728. $('#tipsy_leftn').tipsy({fade: true,gravity:'e'});
  729. $('#tipsy_bottomn').tipsy({fade: true,gravity:'n'});
  730. /* Otros */
  731. $('#pie a').tipsy({fade: true,gravity:'s'});
  732. for(i=1; i<=15; i++)
  733. $('.markItUpButton'+i+' > a:first-child').tipsy({fade: false,gravity:'s'});
  734. });
  735.  
  736.  
  737.  
  738. //SPOILER POR MAXPOWER
  739. /*
  740. var t_spoiler=10;
  741. var fram_spoiler=0;
  742.  
  743. function ventanaSecundaria(){
  744.  
  745. var t_spoiler=10;
  746. var fram_spoiler=0;
  747. var t_spoiler_ms=t_spoiler*100;
  748.  
  749. timer=window.setInterval("contador()",t_spoiler_ms);
  750. hija=window.open("http://www.identi.li","ventana1","width=640,height=425,scrollbars=0,toolbar=no,directories=no,menubar=no,status=no");
  751.  
  752. }
  753.  
  754. function contador(){
  755.  
  756. var obj=$("#contador");
  757.  
  758. if(hija!=null){
  759.  
  760. if(hija.closed){
  761. clearInterval(timer);
  762. t_spoiler=10;
  763. alert("Haz click en un anuncio y espera con la pagina abierta");
  764.         obj.val("Mostrar Enlaces De Descarga");
  765. obj.removeAttr('disabled');
  766. return false;
  767. }
  768.  
  769. if(fram_spoiler==0)
  770. fram_spoiler=hija.frames.length;
  771.  
  772. if(hija.frames.length<1){
  773.  
  774. t_spoiler=t_spoiler-1;
  775. obj.attr('disabled','true');
  776. obj.val(t_spoiler);
  777.  
  778. if(t_spoiler<=0){
  779. clearInterval(timer);
  780. $("#hide").slideDown({duration: 1000, easing: 'easeOutSine'});
  781.                 obj.val('Genial !! Ya puedes Descargar...');
  782.                 obj.addClass('ui-button-positive');
  783.                 obj.removeAttr('onclick');
  784.                
  785. }
  786.  
  787. }
  788. }
  789. } */
  790.  
  791.  
« Última modificación: 12 Mayo 2013, 19:21 pm por Weeken » En línea

EFEX


Desconectado Desconectado

Mensajes: 1.171


"Dinero Facil"


Ver Perfil WWW
Re: alguien sabe como se hace este script ?
« Respuesta #3 en: 3 Enero 2013, 03:57 am »

Esta hecho con jquery y jqueryui (el estilo del boton css). Te das cuenta por que agrega las librerias.
Código
  1. <link rel="stylesheet" type="text/css" href="http://foro-vip.com//css/jquery-ui.css?1341301048"/> /* Archivo CSS para JqueryUI - Le da estilo al boton y popup de errores dentro de la pagina */
  2. <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
  3. /* Libreria Jquery */
  4. <script type="text/javascript" src="http://foro-vip.com//js/jquery-ui-1.8.23.custom.min.js"></script>
  5. /* Libreria JqueryUI */
  6.  

Luego tenes..
Código
  1. <script type="text/javascript" src="http://foro-vip.com//js/aes.js"></script> /* Utilizado para cifrar, descifrar, generar keys, etc, creo que no es utilizado ? */
  2. <script type="text/javascript" src="http://foro-vip.com//js/acciones2.js"></script>  /* La mayoria son funciones para el foro vbulletin, pero al final encontramos lo que queremos. */
  3.  

acciones2.js
Código
  1. var redirector_url = 'http://identi.li/u.php?u=';
  2.  
  3. function linkify(text) {
  4.    if (text) {
  5.        text = text.replace(/((https?\:\/\/)|(www\.))(\S+)(\w{2,4})(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/gi, function (url) {
  6.            var full_url = url;
  7.            if (!full_url.match('^https?:\/\/')) {
  8.                full_url = 'http://' + full_url;
  9.            }
  10.            fullurl = $.trim(full_url);
  11.            url = $.trim(url);
  12.            return '<a target="_blank" rel="nofollow" href="' + redirector_url + full_url + '">' + url + '</a><br/>';
  13.        });
  14.    }
  15.    return text;
  16. }
  17. var timerinterval = 0;
  18. var t_spoiler = 10;
  19. var frame_change = 0;
  20. cdown = {
  21.    spl: {},
  22.    time: 5,
  23.    load: function () {
  24.        var obj = $('.contador');
  25.        var txt = '';
  26.        if (t_spoiler <= this.time && t_spoiler > 0) t_spoiler = t_spoiler - 1;
  27.        if (t_spoiler == this.time) txt = 'Click en Publicidad';
  28.        else if (t_spoiler == 0) txt = 'Click aqu&iacute; para continuar';
  29.        else if (t_spoiler < this.time) txt = 'Espere ' + t_spoiler + ' seg. ';
  30.        obj.html(txt);
  31.        if (t_spoiler <= 0) {
  32.            clearInterval(timer_interval);
  33.            $('#my-dialog').dialog('close');
  34.            _decrypt.open();
  35.        }
  36.    },
  37.    frame: function () {
  38.        frame_change++;
  39.        t_spoiler = this.time
  40.        cdown_start();
  41.    }
  42. }
  43. cdown_start = function () {
  44.    if (frame_change > 1) {
  45.        frame_change = 0;
  46.        timer_interval = setInterval("cdown.load()", 1000);
  47.    }
  48. }
  49. var _open_ads = function () {
  50.    var obj = $('#my-dialog');
  51.    var frame = '<iframe onload="cdown.frame()" id="frame_publi" width="600" height="300" src="http://wwww.identi.li/popup.php"></iframe>';
  52.    dialog_conf.width = 700;
  53.    obj.dialog({
  54.        title: 'Click en la publicidad &raquo; Esperar ' + cdown.time + ' seg'
  55.    });
  56.    obj.html(frame), obj.dialog(dialog_conf);
  57.    obj.dialog("option", "buttons", [{
  58.        text: 'Click en Publicidad',
  59.        "class": 'ui-button-negative contador floatR'
  60.    }]);
  61.    obj.dialog("open");
  62.    $('.ui-dialog-titlebar-close').remove();
  63.    $('frame_publi').live(function () {
  64.        $('a').attr('target', '_self');
  65.    })
  66.    $('.ui-dialog, #frame_publi,.ui-widget-overlay').bind("contextmenu", function (e) {
  67.        return false;
  68.    });
  69. }
  70. var _decrypt = {
  71.    hash: {},
  72.    objeto: {},
  73.    links: function () {
  74.        $('div #decrypt').click(function () {
  75.            if (!$(this).hasClass('block')) {
  76.                _decrypt.objeto = $(this);
  77.                if (global.pauth != 1 && $.cookie('ads_accepted') == null) ventanaSecundaria();
  78.                else _decrypt.open();
  79.            }
  80.        });
  81.    },
  82.    open: function () {
  83.        var elem = this.objeto.parent().find('#hide'),
  84.            content = elem.html();
  85.        this.objeto.addClass('ui-button-positive');
  86.        this.objeto.unbind();
  87.        elem.html(content).slideDown();
  88.    }
  89. }
  90. $(document).on('ready', function () {
  91.    $('.post_body a, .comment-content a').attr('target', '_blank');
  92.    _decrypt.links();
  93. });
  94.  
  95. function getRandom(variablea, variableb) {
  96.    return Math["floor"](Math["random"]() * (variableb - variablea + 1)) + variablea;
  97. };
  98. var pconfig = {
  99.    time: getRandom(12, 16)
  100. };
  101. var t_spoiler = pconfig["time"];
  102. var hija = null;
  103. var timer = 0;
  104. var publi_open = 0;
  105. var publi_closed = 0;
  106.  
  107. function ventanaSecundaria() {
  108.    $("div #decrypt")["addClass"]("block");
  109.    t_spoiler = pconfig["time"];
  110.    publi_closed = 0;
  111.    publi_open = 0;
  112.    hija = window["open"](global["boardurl"] + "/popup.php", "ventana1", "width=450,height=425,scrollbars=0,toolbar=no,directories=no,menubar=no,status=no,top=0,left=0");
  113.    timer = window["setInterval"]("contador()", 1000);
  114. };
  115.  
  116. function contador() {
  117.    var variable14 = _decrypt["objeto"];
  118.    if (hija != null && publi_closed == 0) {
  119.        try {
  120.            var variable15 = hija["closed"];
  121.        } catch (err) {
  122.            var variable15 = true;
  123.        };
  124.        if (hija["closed"]) {
  125.            t_spoiler = pconfig["time"];
  126.            mydialog["alert"]("Haz click en un anuncio y espera con la pagina abierta", "Atencion!");
  127.            variable14["val"]("Ver Links De Descarga");
  128.            _decrypt["objeto"]["bind"]();
  129.            variable14["removeClass"]("ui-button-negative");
  130.            $("div #decrypt")["removeClass"]("block");
  131.            publi_closed = 1;
  132.            hija = null;
  133.            clearInterval(timer);
  134.            return false;
  135.        };
  136.        var variable16 = window["location"]["host"];
  137.        try {
  138.            var variable17 = hija["location"]["host"];
  139.            var variable18 = hija["frames"]["length"];
  140.        } catch (err) {
  141.            var variable17 = "";
  142.            var variable18 = 0;
  143.        };
  144.        if (variable16 != variable17) {
  145.            variable14["addClass"]("ui-button-negative");
  146.            var variable19 = "";
  147.            if (t_spoiler <= pconfig["time"] && t_spoiler > 0) {
  148.                t_spoiler = t_spoiler - 1;
  149.            };
  150.            if (t_spoiler == pconfig["time"]) {
  151.                variable19 = "Click en Publicidad";
  152.            } else {
  153.                if (t_spoiler == 0) {
  154.                    variable19 = "Ya puedes descargar!";
  155.                } else {
  156.                    if (t_spoiler < pconfig["time"]) {
  157.                        variable19 = "No cerrar la publicidad, abriendo links en " + t_spoiler + " seg. ";
  158.                    };
  159.                };
  160.            };
  161.            variable14["val"](variable19);
  162.            if (t_spoiler <= 0) {
  163.                t_spoiler = pconfig["time"];
  164.                publi_open = 1;
  165.                clearInterval(timer);
  166.                _decrypt["open"]();
  167.                $["cookie"]("ads_accepted", 1, {
  168.                    expires: 180
  169.                });
  170.                $("div #decrypt")["removeClass"]("block");
  171.                variable14["removeClass"]("ui-button-negative");
  172.            };
  173.        };
  174.    };
  175. };
  176.  

Esto es sacado de identi ;D, aparte de crear el popup y de establecer un temporizador tambien genera una cookie para establecer que se a aceptado la petición.
Es un poco mas elaborado, si recien estas viendo javascript te recomiendo empezar leyendo  sobre las funciones setInterval y window.open (son propias de javascript) y tratar de conbinarlas. Tambien si utilizas firefox podes descargarte Firebug es un complemento muy util para destripar un sitio web.
« Última modificación: 3 Enero 2013, 04:01 am por EFEX » En línea

Weeken

Desconectado Desconectado

Mensajes: 291


piensa en gratis


Ver Perfil WWW
Re: alguien sabe como se hace este script ?
« Respuesta #4 en: 12 Mayo 2013, 19:15 pm »

Esta hecho con jquery y jqueryui (el estilo del boton css). Te das cuenta por que agrega las librerias.
Código
  1. <link rel="stylesheet" type="text/css" href="http://foro-vip.com//css/jquery-ui.css?1341301048"/> /* Archivo CSS para JqueryUI - Le da estilo al boton y popup de errores dentro de la pagina */
  2. <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
  3. /* Libreria Jquery */
  4. <script type="text/javascript" src="http://foro-vip.com//js/jquery-ui-1.8.23.custom.min.js"></script>
  5. /* Libreria JqueryUI */
  6.  

Luego tenes..
Código
  1. <script type="text/javascript" src="http://foro-vip.com//js/aes.js"></script> /* Utilizado para cifrar, descifrar, generar keys, etc, creo que no es utilizado ? */
  2. <script type="text/javascript" src="http://foro-vip.com//js/acciones2.js"></script>  /* La mayoria son funciones para el foro vbulletin, pero al final encontramos lo que queremos. */
  3.  

acciones2.js
Código
  1. var redirector_url = 'http://identi.li/u.php?u=';
  2.  
  3. function linkify(text) {
  4.    if (text) {
  5.        text = text.replace(/((https?\:\/\/)|(www\.))(\S+)(\w{2,4})(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/gi, function (url) {
  6.            var full_url = url;
  7.            if (!full_url.match('^https?:\/\/')) {
  8.                full_url = 'http://' + full_url;
  9.            }
  10.            fullurl = $.trim(full_url);
  11.            url = $.trim(url);
  12.            return '<a target="_blank" rel="nofollow" href="' + redirector_url + full_url + '">' + url + '</a><br/>';
  13.        });
  14.    }
  15.    return text;
  16. }
  17. var timerinterval = 0;
  18. var t_spoiler = 10;
  19. var frame_change = 0;
  20. cdown = {
  21.    spl: {},
  22.    time: 5,
  23.    load: function () {
  24.        var obj = $('.contador');
  25.        var txt = '';
  26.        if (t_spoiler <= this.time && t_spoiler > 0) t_spoiler = t_spoiler - 1;
  27.        if (t_spoiler == this.time) txt = 'Click en Publicidad';
  28.        else if (t_spoiler == 0) txt = 'Click aqu&iacute; para continuar';
  29.        else if (t_spoiler < this.time) txt = 'Espere ' + t_spoiler + ' seg. ';
  30.        obj.html(txt);
  31.        if (t_spoiler <= 0) {
  32.            clearInterval(timer_interval);
  33.            $('#my-dialog').dialog('close');
  34.            _decrypt.open();
  35.        }
  36.    },
  37.    frame: function () {
  38.        frame_change++;
  39.        t_spoiler = this.time
  40.        cdown_start();
  41.    }
  42. }
  43. cdown_start = function () {
  44.    if (frame_change > 1) {
  45.        frame_change = 0;
  46.        timer_interval = setInterval("cdown.load()", 1000);
  47.    }
  48. }
  49. var _open_ads = function () {
  50.    var obj = $('#my-dialog');
  51.    var frame = '<iframe onload="cdown.frame()" id="frame_publi" width="600" height="300" src="http://wwww.identi.li/popup.php"></iframe>';
  52.    dialog_conf.width = 700;
  53.    obj.dialog({
  54.        title: 'Click en la publicidad &raquo; Esperar ' + cdown.time + ' seg'
  55.    });
  56.    obj.html(frame), obj.dialog(dialog_conf);
  57.    obj.dialog("option", "buttons", [{
  58.        text: 'Click en Publicidad',
  59.        "class": 'ui-button-negative contador floatR'
  60.    }]);
  61.    obj.dialog("open");
  62.    $('.ui-dialog-titlebar-close').remove();
  63.    $('frame_publi').live(function () {
  64.        $('a').attr('target', '_self');
  65.    })
  66.    $('.ui-dialog, #frame_publi,.ui-widget-overlay').bind("contextmenu", function (e) {
  67.        return false;
  68.    });
  69. }
  70. var _decrypt = {
  71.    hash: {},
  72.    objeto: {},
  73.    links: function () {
  74.        $('div #decrypt').click(function () {
  75.            if (!$(this).hasClass('block')) {
  76.                _decrypt.objeto = $(this);
  77.                if (global.pauth != 1 && $.cookie('ads_accepted') == null) ventanaSecundaria();
  78.                else _decrypt.open();
  79.            }
  80.        });
  81.    },
  82.    open: function () {
  83.        var elem = this.objeto.parent().find('#hide'),
  84.            content = elem.html();
  85.        this.objeto.addClass('ui-button-positive');
  86.        this.objeto.unbind();
  87.        elem.html(content).slideDown();
  88.    }
  89. }
  90. $(document).on('ready', function () {
  91.    $('.post_body a, .comment-content a').attr('target', '_blank');
  92.    _decrypt.links();
  93. });
  94.  
  95. function getRandom(variablea, variableb) {
  96.    return Math["floor"](Math["random"]() * (variableb - variablea + 1)) + variablea;
  97. };
  98. var pconfig = {
  99.    time: getRandom(12, 16)
  100. };
  101. var t_spoiler = pconfig["time"];
  102. var hija = null;
  103. var timer = 0;
  104. var publi_open = 0;
  105. var publi_closed = 0;
  106.  
  107. function ventanaSecundaria() {
  108.    $("div #decrypt")["addClass"]("block");
  109.    t_spoiler = pconfig["time"];
  110.    publi_closed = 0;
  111.    publi_open = 0;
  112.    hija = window["open"](global["boardurl"] + "/popup.php", "ventana1", "width=450,height=425,scrollbars=0,toolbar=no,directories=no,menubar=no,status=no,top=0,left=0");
  113.    timer = window["setInterval"]("contador()", 1000);
  114. };
  115.  
  116. function contador() {
  117.    var variable14 = _decrypt["objeto"];
  118.    if (hija != null && publi_closed == 0) {
  119.        try {
  120.            var variable15 = hija["closed"];
  121.        } catch (err) {
  122.            var variable15 = true;
  123.        };
  124.        if (hija["closed"]) {
  125.            t_spoiler = pconfig["time"];
  126.            mydialog["alert"]("Haz click en un anuncio y espera con la pagina abierta", "Atencion!");
  127.            variable14["val"]("Ver Links De Descarga");
  128.            _decrypt["objeto"]["bind"]();
  129.            variable14["removeClass"]("ui-button-negative");
  130.            $("div #decrypt")["removeClass"]("block");
  131.            publi_closed = 1;
  132.            hija = null;
  133.            clearInterval(timer);
  134.            return false;
  135.        };
  136.        var variable16 = window["location"]["host"];
  137.        try {
  138.            var variable17 = hija["location"]["host"];
  139.            var variable18 = hija["frames"]["length"];
  140.        } catch (err) {
  141.            var variable17 = "";
  142.            var variable18 = 0;
  143.        };
  144.        if (variable16 != variable17) {
  145.            variable14["addClass"]("ui-button-negative");
  146.            var variable19 = "";
  147.            if (t_spoiler <= pconfig["time"] && t_spoiler > 0) {
  148.                t_spoiler = t_spoiler - 1;
  149.            };
  150.            if (t_spoiler == pconfig["time"]) {
  151.                variable19 = "Click en Publicidad";
  152.            } else {
  153.                if (t_spoiler == 0) {
  154.                    variable19 = "Ya puedes descargar!";
  155.                } else {
  156.                    if (t_spoiler < pconfig["time"]) {
  157.                        variable19 = "No cerrar la publicidad, abriendo links en " + t_spoiler + " seg. ";
  158.                    };
  159.                };
  160.            };
  161.            variable14["val"](variable19);
  162.            if (t_spoiler <= 0) {
  163.                t_spoiler = pconfig["time"];
  164.                publi_open = 1;
  165.                clearInterval(timer);
  166.                _decrypt["open"]();
  167.                $["cookie"]("ads_accepted", 1, {
  168.                    expires: 180
  169.                });
  170.                $("div #decrypt")["removeClass"]("block");
  171.                variable14["removeClass"]("ui-button-negative");
  172.            };
  173.        };
  174.    };
  175. };
  176.  

Esto es sacado de identi ;D, aparte de crear el popup y de establecer un temporizador tambien genera una cookie para establecer que se a aceptado la petición.
Es un poco mas elaborado, si recien estas viendo javascript te recomiendo empezar leyendo  sobre las funciones setInterval y window.open (son propias de javascript) y tratar de conbinarlas. Tambien si utilizas firefox podes descargarte Firebug es un complemento muy util para destripar un sitio web.

esto ayuda quisas :huh:

http://forobeta.com/otras-plataformas/173040-regalo-script-de-identi.html
« Última modificación: 12 Mayo 2013, 19:24 pm por Weeken » En línea

mr.blood

Desconectado Desconectado

Mensajes: 150


Ver Perfil
Re: alguien sabe como se hace este script ?
« Respuesta #5 en: 12 Mayo 2013, 20:16 pm »

Por favor usad pastebin para codigos de tantisimas lineas...

Sa1uDoS
En línea

#!drvy
Moderador
***
Desconectado Desconectado

Mensajes: 5.850



Ver Perfil WWW
Re: alguien sabe como se hace este script ?
« Respuesta #6 en: 13 Mayo 2013, 01:32 am »

Weeken has abierto 50000 temas preguntado lo mismo...

Saludos
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
¿Alguien sabe que hace este código?
Seguridad
Demenus 4 3,775 Último mensaje 15 Mayo 2010, 22:44 pm
por [L]ord [R]NA
alguien sabe que es lo que hace este codigo????
Desarrollo Web
Paul Young 3 2,221 Último mensaje 20 Julio 2012, 15:15 pm
por Spider-Net
ALGUIEN PUEDE AYUDARME EN COMO SE HACE ESTE PROGRAMA, en Dev C++ « 1 2 »
Programación C/C++
Ivs_mx 11 17,930 Último mensaje 19 Septiembre 2012, 22:18 pm
por Ivs_mx
¿alguien sabe como se hace este scrip de espera en php?
PHP
Weeken 1 2,064 Último mensaje 22 Septiembre 2012, 03:49 am
por WarGhost
Alguien sabe si es un script o como puedo...
Desarrollo Web
WIитX 1 1,947 Último mensaje 25 Marzo 2013, 20:07 pm
por ccrunch
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines