Advertisement
Guest User

Untitled

a guest
Jul 14th, 2014
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.92 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for SourceGuardian & phpSHIELD)
  6. *
  7. * @ Version : 1.1.6.0
  8. * @ Author : DeZender
  9. * @ Release on : 02.06.2013
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. class IBSng {
  15. public $error = null;
  16. public $username = null;
  17. public $password = null;
  18. public $ip = null;
  19. private $handler = null;
  20. private $cookie = null;
  21.  
  22. public function __construct($username, $password, $ip) {
  23. $this->username = $username;
  24. $this->password = $password;
  25. $this->ip = $ip;
  26. $url = $this->ip . '/IBSng/admin/';
  27. $this->handler = curl_init( );
  28. $post_data['username'] = $username;
  29. $post_data['password'] = $password;
  30. curl_setopt( $this->handler, CURLOPT_URL, $url );
  31. curl_setopt( $this->handler, CURLOPT_POST, true );
  32. curl_setopt( $this->handler, CURLOPT_POSTFIELDS, $post_data );
  33. curl_setopt( $this->handler, CURLOPT_HEADER, true );
  34. curl_setopt( $this->handler, CURLOPT_RETURNTRANSFER, true );
  35. curl_setopt( $this->handler, CURLOPT_COOKIEJAR, $this->cookie_file );
  36. curl_setopt( $this->handler, CURLOPT_FOLLOWLOCATION, true );
  37. $output = curl_exec( $this->handler );
  38. preg_match_all( '|Set-Cookie: (.*);|U', $output, $matches );
  39. $this->cookie = implode( '; ', $matches[1] );
  40. }
  41.  
  42. public function userExist($username) {
  43. $url = $this->ip . '/IBSng/admin/user/user_info.php?normal_username_multi=' . $username;
  44. $this->handler = curl_init( );
  45. curl_setopt( $this->handler, CURLOPT_URL, $url );
  46. curl_setopt( $this->handler, CURLOPT_COOKIE, $this->cookie );
  47. curl_setopt( $this->handler, CURLOPT_HEADER, true );
  48. curl_setopt( $this->handler, CURLOPT_RETURNTRANSFER, true );
  49. curl_setopt( $this->handler, CURLOPT_FOLLOWLOCATION, true );
  50. $output = curl_exec( $this->handler );
  51.  
  52. if (strpos( $output, 'does not exists' ) !== false) {
  53. return false;
  54. } else {
  55. $pattern1 = 'change_credit.php?user_id=';
  56. $pos1 = strpos( $output, $pattern1 );
  57. $sub1 = substr( $output, $pos1 + strlen( $pattern1 ), 100 );
  58. $pattern2 = '"';
  59. $pos2 = strpos( $sub1, $pattern2 );
  60. $sub2 = substr( $sub1, 0, $pos2 );
  61. return $sub2;
  62. }
  63.  
  64. }
  65.  
  66. public function addUser($group_name, $username, $password) {
  67. $owner = $username;
  68. $id = $this->addUid( $group_name );
  69. $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';
  70. $post_data['target'] = 'user';
  71. $post_data['target_id'] = $id;
  72. $post_data['update'] = 1;
  73. $post_data['edit_tpl_cs'] = 'normal_username';
  74. $post_data['attr_update_method_0'] = 'normalAttrs';
  75. $post_data['has_normal_username'] = 't';
  76. $post_data['current_normal_username'] = '';
  77. $post_data['normal_username'] = $username;
  78. $post_data['password'] = $password;
  79. $post_data['normal_save_user_add'] = 't';
  80. $post_data['credit'] = 1;
  81. $this->handler = curl_init( );
  82. curl_setopt( $this->handler, CURLOPT_URL, $url );
  83. curl_setopt( $this->handler, CURLOPT_POST, true );
  84. curl_setopt( $this->handler, CURLOPT_POSTFIELDS, $post_data );
  85. curl_setopt( $this->handler, CURLOPT_HEADER, true );
  86. curl_setopt( $this->handler, CURLOPT_RETURNTRANSFER, true );
  87. curl_setopt( $this->handler, CURLOPT_COOKIE, $this->cookie );
  88. curl_setopt( $this->handler, CURLOPT_FOLLOWLOCATION, true );
  89. $output = curl_exec( $this->handler );
  90. return true;
  91. }
  92.  
  93. private function addUid($group_name) {
  94. $url = $this->ip . '/IBSng/admin/user/add_new_users.php';
  95. $post_data['submit_form'] = 1;
  96. $post_data['add'] = 1;
  97. $post_data['count'] = 1;
  98. $post_data['credit'] = 1;
  99. $post_data['owner_name'] = $this->username;
  100. ...............................................................
  101. ...................................
  102. ..............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement