Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1st Step | Modify Autoexec.bat File
- -- Calls Updateip.bat File On Computer Boot
- CALL c:\docume~1\owner\updateip.bat
- 2nd Step | Create Updateip.bat File
- -- Calls Serverip.php Script Every 30 Mintues
- :START
- "c:\xampp\php\php.exe" "c:\xampp\hns\serverip.php"
- SLEEP 3600
- GOTO START
- 3rd Step | Create Serverip.php File
- -- Get's My Server's IP From Link
- -- Logs Into Pastebin's API To Receive API_USER_KEY
- -- Pastes IP To Pastebin
- -- Stores Old Paste Key From Text File
- -- Adds New Paste Key To Text File
- -- Removes Old Pastebin Server IP Using Stored Old Paste Key
- <?php
- $ip = file_get_contents('http://whatismyip.org/');
- $api_dev_key = '';
- $api_user_name = urlencode('');
- $api_user_password = urlencode('');
- $ch = curl_init('http://pastebin.com/api/api_login.php');
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, 'api_dev_key='.$api_dev_key.'&api_user_name='.$api_user_name.'&api_user_password='.$api_user_password.'');
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_VERBOSE, 1);
- curl_setopt($ch, CURLOPT_NOBODY, 0);
- $api_user_key = curl_exec($ch);
- $api_paste_private = '1';
- $api_paste_expire_date = 'N';
- $api_paste_format = 'php';
- $api_paste_name = urlencode('Server IP Address');
- $api_paste_code = urlencode($ip);
- $ch = curl_init('http://pastebin.com/api/api_post.php');
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, 'api_option=paste&api_user_key='.$api_user_key.'&api_paste_private='.$api_paste_private.'&api_paste_name='.$api_paste_name.'&api_paste_expire_date='.$api_paste_expire_date.'&api_paste_format='.$api_paste_format.'&api_dev_key='.$api_dev_key.'&api_paste_code='.$api_paste_code.'');
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_VERBOSE, 1);
- curl_setopt($ch, CURLOPT_NOBODY, 0);
- $response = curl_exec($ch);
- $filename = 'pastebin.txt';
- if (filesize($filename) > 0) {
- $fh = fopen($filename, 'r') or die("can't open file");
- $api_paste_key = fread($fh,filesize($filename));
- fclose($fh);
- }
- $fh = fopen($filename, 'w') or die("can't open file");
- fwrite($fh, substr($response,20));
- fclose($fh);
- $ch = curl_init('http://pastebin.com/api/api_post.php');
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, 'api_option=delete&api_user_key='.$api_user_key.'&api_dev_key='.$api_dev_key.'&api_paste_key='.$api_paste_key.'');
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_VERBOSE, 1);
- curl_setopt($ch, CURLOPT_NOBODY, 0);
- $response = curl_exec($ch);
- ?>
- Step 4 | Create Serverpaste.php File
- -- Allows Access From All Origins
- -- Requests All My Pastebin's From My Account
- -- Returns Results For ip.html To Interpret Pastes
- <?php
- header('Access-Control-Allow-Origin: *');
- $api_dev_key = '';
- $api_user_name = urlencode('');
- $api_user_password = urlencode('');
- $api_paste_name = urlencode('Server IP Address');
- $api_results_limit = '50';
- $ch = curl_init('http://pastebin.com/api/api_login.php');
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, 'api_dev_key='.$api_dev_key.'&api_user_name='.$api_user_name.'&api_user_password='.$api_user_password.'');
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_VERBOSE, 1);
- curl_setopt($ch, CURLOPT_NOBODY, 0);
- $api_user_key = curl_exec($ch);
- $ch = curl_init('http://pastebin.com/api/api_post.php');
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, 'api_option=list&api_user_key='.$api_user_key.'&api_dev_key='.$api_dev_key.'&api_results_limit='.$api_results_limit.'');
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_VERBOSE, 1);
- curl_setopt($ch, CURLOPT_NOBODY, 0);
- $response = curl_exec($ch);
- echo $response;
- ?>
- Step 5 | Create ip.html Page
- -- http://hnsserverip.site90.com Is Serverpastes.php File Renamed To Index.php
- -- Remove Analytics Tracking Codes From End Of Response
- -- Filter Through All Pastes To Find Paste Titled 'Server IP Address'
- -- Return Raw Link To Paste With Paste Key
- <html>
- <head>
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
- <script>
- $(document).ready(function(){
- $.get("http://hnsserverip.site90.com", function(response) {
- var ind = response.indexOf("<!--");
- response = response.substring(0,ind);
- $(response).filter('paste').each(function() {
- if ($(this).find('paste_title').text() == "Server IP Address") $("body #result").html("http://pastebin.com/raw.php?i="+$(this).find('paste_key').text());
- });
- });
- });
- </script>
- </head>
- <body>
- <div id="result"></div>
- </body>
- </html>
- // Step 6 | Create index.html Page
- -- Retrieve Link To IP On Target Page
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement