Guest User

ninofrenn file decoded

a guest
Mar 12th, 2013
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.78 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 1.1.5.0
  8. * @ Author : DeZender
  9. * @ Release on : 30.07.2012
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function auto_link_text($text) {
  15. $pattern = '@http://(?:www\.)?(\S+/)\S*(?:\s|$)@i';
  16. $callback = create_function( '$matches', '
  17. $url = array_shift($matches);
  18. $url_parts = parse_url($url);
  19.  
  20. $text = parse_url($url, PHP_URL_HOST) . parse_url($url, PHP_URL_PATH);
  21. $text = preg_replace("/^www./", "", $text);
  22.  
  23. $last = -(strlen(strrchr($text, "/"))) + 1;
  24. if ($last < 0) {
  25. $text = substr($text, 0, $last) . "&hellip;";
  26. }
  27.  
  28. return sprintf(\'<a rel="nofollow" href="%s">%s</a>\', $url, $text);
  29. ' );
  30. preg_match_all( '#<(a|img|iframe)(.*?)http:\/\/(.*?)>#i', $text, $out );
  31. $new = array( );
  32. $old = array( );
  33. $i = 0;
  34.  
  35. while ($i < count( $out[0] )) {
  36. $newout = str_replace( 'http://', 'hxxp://', $out[0][$i] );
  37. array_push( $new, $newout );
  38. array_push( $old, $out[0][$i] );
  39. ++$i;
  40. }
  41.  
  42. $string = str_replace( $old, $new, $text );
  43. return str_replace( 'hxxp://', 'http://', preg_replace_callback( $pattern, $callback, $string ) );
  44. }
  45.  
  46. function ratna_strip_selected_tags($text, $tags = array( )) {
  47. $args = func_get_args( );
  48. $text = array_shift( $args );
  49. $tags = (2 < func_num_args( ) ? array_diff( $args, array( $text ) ) : (array)$tags);
  50. foreach ($tags as $tag) {
  51. while (preg_match( '/<' . $tag . '(|\W[^>]*)>(.*)<\/' . $tag . '>/iusU', $text, $found )) {
  52. $text = str_replace( $found[0], $found[2], $text );
  53. }
  54. }
  55.  
  56. return preg_replace( '/(<(' . join( '|', $tags ) . ')(|\W.*)\/>)/iusU', '', $text );
  57. }
  58.  
  59. function cleanchars($rawhtml, $save = '') {
  60. $rawhtml = mb_convert_encoding( $rawhtml, 'UTF-8', 'HTML-ENTITIES' );
  61. $rawhtml = preg_replace( '/[^a-zA-Z0-9\s%"\'-_\+=\.,><\?\$@!\(\)\*&\^:;\/\/]/', '', $rawhtml );
  62.  
  63. if ($save != 'script') {
  64. $rawhtml = preg_replace( '/<script\b[^>]*>(.*?)<\/script>/is', '', $rawhtml );
  65. }
  66.  
  67. $final = preg_replace( '/[^(\x20-\x7F)]*/', '', $rawhtml );
  68. return $final;
  69. }
  70.  
  71. function crawl($url, $ref = '', $data = '') {
  72. $ua = getRandom_ua( );
  73. $path = $_SERVER['DOCUMENT_ROOT'] . str_replace( basename( $_SERVER['PHP_SELF'] ), '', $_SERVER['PHP_SELF'] );
  74.  
  75. if ($ref == '') {
  76. $ref = $url;
  77. }
  78.  
  79. $ch = curl_init( );
  80. $https = strpos( $url, 'https://' );
  81.  
  82. if ($https !== false) {
  83. curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
  84. curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, 2 );
  85. }
  86.  
  87.  
  88. if ($data != '') {
  89. curl_setopt( $ch, CURLOPT_POSTFIELDS, $data );
  90. }
  91.  
  92.  
  93. if ($ref != 'NO') {
  94. curl_setopt( $ch, CURLOPT_REFERER, $ref );
  95. }
  96.  
  97. curl_setopt( $ch, CURLOPT_URL, $url );
  98. curl_setopt( $ch, CURLOPT_USERAGENT, $ua );
  99. curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
  100. curl_setopt( $ch, CURLOPT_COOKIEJAR, $path . '/curlcookie.txt' );
  101. curl_setopt( $ch, CURLOPT_COOKIEFILE, $path . '/curlcookie.txt' );
  102.  
  103. if (( ini_get( 'open_basedir' ) != '' || ini_get( 'safe_mode' ) != 0 )) {
  104. $result = curl_redir_exec( $ch );
  105. }
  106. else {
  107. curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1 );
  108. $result = curl_exec( $ch );
  109. }
  110.  
  111. curl_close( $ch );
  112. return $result;
  113. }
  114.  
  115. function curl_redir_exec($ch) {
  116. static $curl_loops = 0;
  117. static $curl_max_loops = 20;
  118.  
  119. if ($curl_max_loops <= $curl_loops++) {
  120. $curl_loops = 0;
  121. return false;
  122. }
  123.  
  124. curl_setopt( $ch, CURLOPT_HEADER, true );
  125. curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
  126. $data = curl_exec( $ch );
  127. list( $header, $data ) = explode( '
  128.  
  129. ', $data, 2 );
  130. $http_code = curl_getinfo( $ch, CURLINFO_HTTP_CODE );
  131.  
  132. if (( $http_code == 301 || $http_code == 302 )) {
  133. $matches = array( );
  134. preg_match( '/Location:(.*?)\n/', $header, $matches );
  135. $url = @parse_url( @trim( @array_pop( $matches ) ) );
  136.  
  137. if (!$url) {
  138. $curl_loops = 0;
  139. return $data;
  140. }
  141.  
  142. $last_url = parse_url( curl_getinfo( $ch, CURLINFO_EFFECTIVE_URL ) );
  143.  
  144. if (!$url['scheme']) {
  145. $url['scheme'] = $last_url['scheme'];
  146. }
  147.  
  148.  
  149. if (!$url['host']) {
  150. $url['host'] = $last_url['host'];
  151. }
  152.  
  153.  
  154. if (!$url['path']) {
  155. $url['path'] = $last_url['path'];
  156. }
  157.  
  158. $new_url = $url['scheme'] . '://' . $url['host'] . $url['path'] . ($url['query'] ? '?' . $url['query'] : '');
  159. curl_setopt( $ch, CURLOPT_URL, $new_url );
  160. return curl_redir_exec( $ch );
  161. }
  162.  
  163. $curl_loops = 0;
  164. return $data;
  165. }
  166.  
  167. function logWriter($title) {
  168. $fp = fopen( 'title_posted.log', 'a' );
  169. fputs( $fp, $title . '
  170. ' );
  171. fclose( $fp );
  172. }
  173.  
  174. function contentpost($title, $body, $urlsrc) {
  175. $orititle = $title;
  176. $spunbody = '';
  177. $spunttitle = '';
  178. require_once( 'settings.php' );
  179. $bloggeremail = trim( $bloggeremail );
  180.  
  181. if ($striplink == 1) {
  182. $body = ratna_strip_selected_tags( $body, array( 'a', 'url' ) );
  183. }
  184.  
  185.  
  186. if (( ( $contentspin == 1 && $tbs_username != '' ) && $tbs_password != '' )) {
  187. include( 'tbsspin.php' );
  188. $args = array( 'tbs_login' => $tbs_username, 'tbs_password' => $tbs_password, 'tbs_quality' => $quality, 'protected' => $protect, 'title' => $title, 'content' => $body );
  189. $result = tbs_action( $args );
  190. $spunbody = $result['content'];
  191. $spunttitle = $result['title'];
  192. }
  193.  
  194.  
  195. if ($srclink == 1) {
  196. $src = 'Via: <a href="' . $urlsrc . '" target="_blank" rel="nofollow">' . $title . '</a>';
  197.  
  198. if ($spunttitle != '') {
  199. $title = $spunttitle;
  200. }
  201.  
  202.  
  203. if ($spunbody != '') {
  204. $body = $spunbody . '<br />
  205. <small>' . $src . '</small>
  206. ';
  207. }
  208. else {
  209. $body .= '<br />
  210. <small>' . $src . '</small>
  211. ';
  212. }
  213. }
  214. else {
  215. if ($spunttitle != '') {
  216. $title = $spunttitle;
  217. }
  218.  
  219.  
  220. if ($spunbody != '') {
  221. $body = $spunbody;
  222. }
  223. }
  224.  
  225.  
  226. if ($keywords != '') {
  227. $linkold = array( );
  228. $linknew = array( );
  229. $imold = array( );
  230. $imnew = array( );
  231. preg_match_all( '/<img(.*)?>/', $body, $image );
  232. $y = 0;
  233.  
  234. while ($y < count( $image[0] )) {
  235. array_push( $imold, $image[0][$y] );
  236. array_push( $imnew, base64_encode( $image[0][$y] ) );
  237. ++$y;
  238. }
  239.  
  240. $body = str_replace( $imold, $imnew, $body );
  241. $kw = explode( '
  242. ', $keywords );
  243. $i = 0;
  244.  
  245. while ($i < count( $kw )) {
  246. preg_match_all( '/<a(.*)?<\/a>/', $body, $link );
  247. $n = 0;
  248.  
  249. while ($n < count( $link[0] )) {
  250. array_push( $linkold, $link[0][$n] );
  251. array_push( $linknew, base64_encode( $link[0][$n] ) );
  252. ++$n;
  253. }
  254.  
  255. $body = str_replace( $linkold, $linknew, $body );
  256. $el = explode( '|', $kw[$i] );
  257. $body = preg_replace( '/' . $el[0] . '/i', '<a href="' . $el[1] . '" target="_blank" rel="nofollow">$0</a>', $body );
  258. ++$i;
  259. }
  260.  
  261. $body = str_replace( $linknew, $linkold, $body );
  262. $body = str_replace( $imnew, $imold, $body );
  263. }
  264.  
  265.  
  266. if (!empty( $bloggeremail )) {
  267. $writer = array( 'Jim', 'Alan', 'Susan', 'Alex', 'Curt', 'Joshua', 'Robbert', 'Diana', 'Jane', 'Rene', 'Deane', 'Clark', 'Hellen', 'Edward', 'Heidy' );
  268. $randname = array_rand( $writer, 3 );
  269. $headers = 'MIME-Version: 1.0' . '
  270. ';
  271. $headers .= 'Content-type:text/html;charset=UTF-8' . '
  272. ';
  273. $headers .= 'From: ' . $randname[1] . '<' . $randname[1] . '@' . str_replace( 'www.', '', $_SERVER['HTTP_HOST'] ) . '>' . '
  274. ';
  275.  
  276. if (mail( $bloggeremail, $title, $body, $headers )) {
  277. logWriter( $orititle );
  278. echo 'Posted: ' . $title . '<br />' . $body;
  279. return null;
  280. }
  281.  
  282. echo 'Failed, attempting to post ' . $title . '<br />' . $body;
  283. return null;
  284. }
  285.  
  286. $my_post = array( 'post_title' => $title, 'post_content' => $body, 'post_status' => $post_status, 'post_author' => 1, 'post_category' => $wpcategory );
  287.  
  288. if (wp_insert_post( $my_post )) {
  289. logWriter( $orititle );
  290. echo 'Posted: ' . $title . '<br />' . $body;
  291. return null;
  292. }
  293.  
  294. echo 'Failed, attempting to post ' . $title . '<br />' . $body;
  295. }
  296.  
  297. function getRandom_ua() {
  298. $ua = array( 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3) Gecko/20090305 Firefox/3.1b3 GTB5', 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; ko; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2', 'Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.9b5) Gecko/2008032620 Firefox/3.0b5', 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.12) Gecko/20080214 Firefox/2.0.0.12', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8', 'Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.8.0.5) Gecko/20060819 Firefox/1.5.0.5', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; es-ES; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3', 'Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7.9) Gecko/20050711 Firefox/1.0.5', 'Mozilla/4.0 (Windows; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)', 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB5; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2; OfficeLiveConnector.1.3; OfficeLivePatch.0.0)', 'Mozilla/4.0 (Mozilla/4.0; MSIE 7.0; Windows NT 5.1; FDM; SV1; .NET CLR 3.0.04506.30)', 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727)', 'Mozilla/4.0 (compatible; MSIE 5.0b1; Mac_PowerPC)', 'Mozilla/4.0 (compatible; MSIE 5.23; Mac_PowerPC)', 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; GTB6; Ant.com Toolbar 1.6; MSIECrawler)', 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; InfoPath.2; .NET CLR 3.5.21022; .NET CLR 3.5.30729; MS-RTC LM 8; OfficeLiveConnector.1.4; OfficeLivePatch.1.3; .NET CLR 3.0.30729)', 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; InfoPath.2; .NET CLR 3.5.21022; .NET CLR 3.5.30729; MS-RTC LM 8; OfficeLiveConnector.1.4; OfficeLivePatch.1.3; .NET CLR 3.0.30729)', 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; InfoPath.2)', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fi-fi) AppleWebKit/420+ (KHTML, like Gecko) Safari/419.3', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.7', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/312.8 (KHTML, like Gecko) Safari/312.6', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ) AppleWebKit/523.15 (KHTML, like Gecko) Version/3.0 Safari/523.15', 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16', 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_5_6; it-it) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16', 'Mozilla/5.0 (Windows; U; Windows NT 5.0; it-IT; rv:1.7.12) Gecko/20050915', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020919', 'Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 5.12 [en]', 'Opera/6.0 (Windows 2000; U) [fr]', 'Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 4.0) Opera 6.01 [en]', 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.10 [en]', 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 9.24', 'Opera/9.51 (Macintosh; Intel Mac OS X; U; en)', 'Opera/9.70 (Linux i686 ; U; en) Presto/2.2.1', 'Opera/9.80 (Windows NT 5.1; U; cs) Presto/2.2.15 Version/10.00' );
  299. $x = array_rand( $ua, 1 );
  300. $agent = $ua[$x];
  301. return $agent;
  302. }
  303.  
  304.  
  305. if (file_exists( 'wp-config.php' )) {
  306. require_once( 'wp-config.php' );
  307. }
  308. else {
  309. if (file_exists( '../wp-config.php' )) {
  310. require_once( '../wp-config.php' );
  311. }
  312. else {
  313. if (file_exists( '../../wp-config.php' )) {
  314. require_once( '../../wp-config.php' );
  315. }
  316. else {
  317. if (file_exists( '../../../wp-config.php' )) {
  318. require_once( '../../../wp-config.php' );
  319. }
  320. }
  321. }
  322. }
  323.  
  324.  
  325. if (!class_exists( 'simple_html_dom' )) {
  326. require_once( 'include/htmldom.php' );
  327. }
  328.  
  329. ?>
Add Comment
Please, Sign In to add comment