Advertisement
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 SourceGuardian & phpSHIELD)
- *
- * @ Version : 1.1.6.0
- * @ Author : DeZender
- * @ Release on : 02.06.2013
- * @ Official site : http://DeZender.Net
- *
- */
- class IBSng {
- public $error = null;
- public $username = null;
- public $password = null;
- public $ip = null;
- private $handler = null;
- private $cookie = null;
- public function __construct($username, $password, $ip) {
- $this->username = $username;
- $this->password = $password;
- $this->ip = $ip;
- $url = $this->ip . '/IBSng/admin/';
- $this->handler = curl_init( );
- $post_data['username'] = $username;
- $post_data['password'] = $password;
- curl_setopt( $this->handler, CURLOPT_URL, $url );
- curl_setopt( $this->handler, CURLOPT_POST, true );
- curl_setopt( $this->handler, CURLOPT_POSTFIELDS, $post_data );
- curl_setopt( $this->handler, CURLOPT_HEADER, true );
- curl_setopt( $this->handler, CURLOPT_RETURNTRANSFER, true );
- curl_setopt( $this->handler, CURLOPT_COOKIEJAR, $this->cookie_file );
- curl_setopt( $this->handler, CURLOPT_FOLLOWLOCATION, true );
- $output = curl_exec( $this->handler );
- preg_match_all( '|Set-Cookie: (.*);|U', $output, $matches );
- $this->cookie = implode( '; ', $matches[1] );
- }
- public function userExist($username) {
- $url = $this->ip . '/IBSng/admin/user/user_info.php?normal_username_multi=' . $username;
- $this->handler = curl_init( );
- curl_setopt( $this->handler, CURLOPT_URL, $url );
- curl_setopt( $this->handler, CURLOPT_COOKIE, $this->cookie );
- curl_setopt( $this->handler, CURLOPT_HEADER, true );
- curl_setopt( $this->handler, CURLOPT_RETURNTRANSFER, true );
- curl_setopt( $this->handler, CURLOPT_FOLLOWLOCATION, true );
- $output = curl_exec( $this->handler );
- if (strpos( $output, 'does not exists' ) !== false) {
- return false;
- } else {
- $pattern1 = 'change_credit.php?user_id=';
- $pos1 = strpos( $output, $pattern1 );
- $sub1 = substr( $output, $pos1 + strlen( $pattern1 ), 100 );
- $pattern2 = '"';
- $pos2 = strpos( $sub1, $pattern2 );
- $sub2 = substr( $sub1, 0, $pos2 );
- return $sub2;
- }
- }
- public function addUser($group_name, $username, $password) {
- $owner = $username;
- $id = $this->addUid( $group_name );
- $url = $this->ip . '/IBSng/admin/plugins/edit.php?edit_user=1&user_id=' . $id . '&submit_form=1&add=1&count=1&credit=1&owner_name=' . $owner . '&group_name=' . $group_name . '&x=35&y=1&edit__normal_username=normal_username&edit__voip_username=voip_username';
- $post_data['target'] = 'user';
- $post_data['target_id'] = $id;
- $post_data['update'] = 1;
- $post_data['edit_tpl_cs'] = 'normal_username';
- $post_data['attr_update_method_0'] = 'normalAttrs';
- $post_data['has_normal_username'] = 't';
- $post_data['current_normal_username'] = '';
- $post_data['normal_username'] = $username;
- $post_data['password'] = $password;
- $post_data['normal_save_user_add'] = 't';
- $post_data['credit'] = 1;
- $this->handler = curl_init( );
- curl_setopt( $this->handler, CURLOPT_URL, $url );
- curl_setopt( $this->handler, CURLOPT_POST, true );
- curl_setopt( $this->handler, CURLOPT_POSTFIELDS, $post_data );
- curl_setopt( $this->handler, CURLOPT_HEADER, true );
- curl_setopt( $this->handler, CURLOPT_RETURNTRANSFER, true );
- curl_setopt( $this->handler, CURLOPT_COOKIE, $this->cookie );
- curl_setopt( $this->handler, CURLOPT_FOLLOWLOCATION, true );
- $output = curl_exec( $this->handler );
- return true;
- }
- private function addUid($group_name) {
- $url = $this->ip . '/IBSng/admin/user/add_new_users.php';
- $post_data['submit_form'] = 1;
- $post_data['add'] = 1;
- $post_data['count'] = 1;
- $post_data['credit'] = 1;
- $post_data['owner_name'] = $this->username;
- ...............................................................
- ...................................
- ..............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement