Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 1.1.5.0
- * @ Author : DeZender
- * @ Release on : 30.07.2012
- * @ Official site : http://DeZender.Net
- *
- */
- function auto_link_text($text) {
- $pattern = '@http://(?:www\.)?(\S+/)\S*(?:\s|$)@i';
- $callback = create_function( '$matches', '
- $url = array_shift($matches);
- $url_parts = parse_url($url);
- $text = parse_url($url, PHP_URL_HOST) . parse_url($url, PHP_URL_PATH);
- $text = preg_replace("/^www./", "", $text);
- $last = -(strlen(strrchr($text, "/"))) + 1;
- if ($last < 0) {
- $text = substr($text, 0, $last) . "…";
- }
- return sprintf(\'<a rel="nofollow" href="%s">%s</a>\', $url, $text);
- ' );
- preg_match_all( '#<(a|img|iframe)(.*?)http:\/\/(.*?)>#i', $text, $out );
- $new = array( );
- $old = array( );
- $i = 0;
- while ($i < count( $out[0] )) {
- $newout = str_replace( 'http://', 'hxxp://', $out[0][$i] );
- array_push( $new, $newout );
- array_push( $old, $out[0][$i] );
- ++$i;
- }
- $string = str_replace( $old, $new, $text );
- return str_replace( 'hxxp://', 'http://', preg_replace_callback( $pattern, $callback, $string ) );
- }
- function ratna_strip_selected_tags($text, $tags = array( )) {
- $args = func_get_args( );
- $text = array_shift( $args );
- $tags = (2 < func_num_args( ) ? array_diff( $args, array( $text ) ) : (array)$tags);
- foreach ($tags as $tag) {
- while (preg_match( '/<' . $tag . '(|\W[^>]*)>(.*)<\/' . $tag . '>/iusU', $text, $found )) {
- $text = str_replace( $found[0], $found[2], $text );
- }
- }
- return preg_replace( '/(<(' . join( '|', $tags ) . ')(|\W.*)\/>)/iusU', '', $text );
- }
- function cleanchars($rawhtml, $save = '') {
- $rawhtml = mb_convert_encoding( $rawhtml, 'UTF-8', 'HTML-ENTITIES' );
- $rawhtml = preg_replace( '/[^a-zA-Z0-9\s%"\'-_\+=\.,><\?\$@!\(\)\*&\^:;\/\/]/', '', $rawhtml );
- if ($save != 'script') {
- $rawhtml = preg_replace( '/<script\b[^>]*>(.*?)<\/script>/is', '', $rawhtml );
- }
- $final = preg_replace( '/[^(\x20-\x7F)]*/', '', $rawhtml );
- return $final;
- }
- function crawl($url, $ref = '', $data = '') {
- $ua = getRandom_ua( );
- $path = $_SERVER['DOCUMENT_ROOT'] . str_replace( basename( $_SERVER['PHP_SELF'] ), '', $_SERVER['PHP_SELF'] );
- if ($ref == '') {
- $ref = $url;
- }
- $ch = curl_init( );
- $https = strpos( $url, 'https://' );
- if ($https !== false) {
- curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
- curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, 2 );
- }
- if ($data != '') {
- curl_setopt( $ch, CURLOPT_POSTFIELDS, $data );
- }
- if ($ref != 'NO') {
- curl_setopt( $ch, CURLOPT_REFERER, $ref );
- }
- curl_setopt( $ch, CURLOPT_URL, $url );
- curl_setopt( $ch, CURLOPT_USERAGENT, $ua );
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
- curl_setopt( $ch, CURLOPT_COOKIEJAR, $path . '/curlcookie.txt' );
- curl_setopt( $ch, CURLOPT_COOKIEFILE, $path . '/curlcookie.txt' );
- if (( ini_get( 'open_basedir' ) != '' || ini_get( 'safe_mode' ) != 0 )) {
- $result = curl_redir_exec( $ch );
- }
- else {
- curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1 );
- $result = curl_exec( $ch );
- }
- curl_close( $ch );
- return $result;
- }
- function curl_redir_exec($ch) {
- static $curl_loops = 0;
- static $curl_max_loops = 20;
- if ($curl_max_loops <= $curl_loops++) {
- $curl_loops = 0;
- return false;
- }
- curl_setopt( $ch, CURLOPT_HEADER, true );
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
- $data = curl_exec( $ch );
- list( $header, $data ) = explode( '
- ', $data, 2 );
- $http_code = curl_getinfo( $ch, CURLINFO_HTTP_CODE );
- if (( $http_code == 301 || $http_code == 302 )) {
- $matches = array( );
- preg_match( '/Location:(.*?)\n/', $header, $matches );
- $url = @parse_url( @trim( @array_pop( $matches ) ) );
- if (!$url) {
- $curl_loops = 0;
- return $data;
- }
- $last_url = parse_url( curl_getinfo( $ch, CURLINFO_EFFECTIVE_URL ) );
- if (!$url['scheme']) {
- $url['scheme'] = $last_url['scheme'];
- }
- if (!$url['host']) {
- $url['host'] = $last_url['host'];
- }
- if (!$url['path']) {
- $url['path'] = $last_url['path'];
- }
- $new_url = $url['scheme'] . '://' . $url['host'] . $url['path'] . ($url['query'] ? '?' . $url['query'] : '');
- curl_setopt( $ch, CURLOPT_URL, $new_url );
- return curl_redir_exec( $ch );
- }
- $curl_loops = 0;
- return $data;
- }
- function logWriter($title) {
- $fp = fopen( 'title_posted.log', 'a' );
- fputs( $fp, $title . '
- ' );
- fclose( $fp );
- }
- function contentpost($title, $body, $urlsrc) {
- $orititle = $title;
- $spunbody = '';
- $spunttitle = '';
- require_once( 'settings.php' );
- $bloggeremail = trim( $bloggeremail );
- if ($striplink == 1) {
- $body = ratna_strip_selected_tags( $body, array( 'a', 'url' ) );
- }
- if (( ( $contentspin == 1 && $tbs_username != '' ) && $tbs_password != '' )) {
- include( 'tbsspin.php' );
- $args = array( 'tbs_login' => $tbs_username, 'tbs_password' => $tbs_password, 'tbs_quality' => $quality, 'protected' => $protect, 'title' => $title, 'content' => $body );
- $result = tbs_action( $args );
- $spunbody = $result['content'];
- $spunttitle = $result['title'];
- }
- if ($srclink == 1) {
- $src = 'Via: <a href="' . $urlsrc . '" target="_blank" rel="nofollow">' . $title . '</a>';
- if ($spunttitle != '') {
- $title = $spunttitle;
- }
- if ($spunbody != '') {
- $body = $spunbody . '<br />
- <small>' . $src . '</small>
- ';
- }
- else {
- $body .= '<br />
- <small>' . $src . '</small>
- ';
- }
- }
- else {
- if ($spunttitle != '') {
- $title = $spunttitle;
- }
- if ($spunbody != '') {
- $body = $spunbody;
- }
- }
- if ($keywords != '') {
- $linkold = array( );
- $linknew = array( );
- $imold = array( );
- $imnew = array( );
- preg_match_all( '/<img(.*)?>/', $body, $image );
- $y = 0;
- while ($y < count( $image[0] )) {
- array_push( $imold, $image[0][$y] );
- array_push( $imnew, base64_encode( $image[0][$y] ) );
- ++$y;
- }
- $body = str_replace( $imold, $imnew, $body );
- $kw = explode( '
- ', $keywords );
- $i = 0;
- while ($i < count( $kw )) {
- preg_match_all( '/<a(.*)?<\/a>/', $body, $link );
- $n = 0;
- while ($n < count( $link[0] )) {
- array_push( $linkold, $link[0][$n] );
- array_push( $linknew, base64_encode( $link[0][$n] ) );
- ++$n;
- }
- $body = str_replace( $linkold, $linknew, $body );
- $el = explode( '|', $kw[$i] );
- $body = preg_replace( '/' . $el[0] . '/i', '<a href="' . $el[1] . '" target="_blank" rel="nofollow">$0</a>', $body );
- ++$i;
- }
- $body = str_replace( $linknew, $linkold, $body );
- $body = str_replace( $imnew, $imold, $body );
- }
- if (!empty( $bloggeremail )) {
- $writer = array( 'Jim', 'Alan', 'Susan', 'Alex', 'Curt', 'Joshua', 'Robbert', 'Diana', 'Jane', 'Rene', 'Deane', 'Clark', 'Hellen', 'Edward', 'Heidy' );
- $randname = array_rand( $writer, 3 );
- $headers = 'MIME-Version: 1.0' . '
- ';
- $headers .= 'Content-type:text/html;charset=UTF-8' . '
- ';
- $headers .= 'From: ' . $randname[1] . '<' . $randname[1] . '@' . str_replace( 'www.', '', $_SERVER['HTTP_HOST'] ) . '>' . '
- ';
- if (mail( $bloggeremail, $title, $body, $headers )) {
- logWriter( $orititle );
- echo 'Posted: ' . $title . '<br />' . $body;
- return null;
- }
- echo 'Failed, attempting to post ' . $title . '<br />' . $body;
- return null;
- }
- $my_post = array( 'post_title' => $title, 'post_content' => $body, 'post_status' => $post_status, 'post_author' => 1, 'post_category' => $wpcategory );
- if (wp_insert_post( $my_post )) {
- logWriter( $orititle );
- echo 'Posted: ' . $title . '<br />' . $body;
- return null;
- }
- echo 'Failed, attempting to post ' . $title . '<br />' . $body;
- }
- function getRandom_ua() {
- $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' );
- $x = array_rand( $ua, 1 );
- $agent = $ua[$x];
- return $agent;
- }
- if (file_exists( 'wp-config.php' )) {
- require_once( 'wp-config.php' );
- }
- else {
- if (file_exists( '../wp-config.php' )) {
- require_once( '../wp-config.php' );
- }
- else {
- if (file_exists( '../../wp-config.php' )) {
- require_once( '../../wp-config.php' );
- }
- else {
- if (file_exists( '../../../wp-config.php' )) {
- require_once( '../../../wp-config.php' );
- }
- }
- }
- }
- if (!class_exists( 'simple_html_dom' )) {
- require_once( 'include/htmldom.php' );
- }
- ?>
Add Comment
Please, Sign In to add comment