ABA


"צריך עזרה קטנה בPERL בנוגע לייצירת קבץ מקוד מקור"
גירסת הדפסה        
קבוצות דיון פיתוח, תיכנות ובניית אתרים נושא #12481 מנהל    סגן המנהל    מפקח   Winner    צל"ש   מומחה  
אשכול מספר 12481
peeves
חבר מתאריך 2.8.02
2002 הודעות, דרג אמינות חבר זה
   18:27   20.09.05   
אל הפורום  
  צריך עזרה קטנה בPERL בנוגע לייצירת קבץ מקוד מקור  
 
אוקיי אז ככה יש לי את הקוד מקור הבא

#!/usr/bin/perl


#
# Copyright 2002 nick84 - Rootsecure.net #
# #
# You may use / modified this code as long as you leave this #
# here message in the source. #
# By using this code you agree to indemnify rootsecure.net #
# from any liability that might arise from its use. #
# #
# Selling this source code without prior consent is expressly #
# forbidden. #
# #
# By downloading this code you agree not to use it for any #
# illegal purpose. I.e. Only on forums you already have #
# administration rights over. #
# #
#


# Header Info
print "Content-type: text/html\n\n";
print "root_a_phpBB_2.0.0.pl perl command line version\n";
print "Coded by nick84@ (http://www.rootsecure.net)\n\n";


# Usage Instructions Shown On Screen
print <<ENDHTML;
Usage Instructions (data gathering)
------------------


1. Goto the board you wish to change the permissions for in the normal way
using a browser.
2. Find the base directory location of the board for the script,
i.e. if the main page was http://www.server.com/phpBB2/index.php
the base directory location would be http://www.server.com/phpBB2
- without the trailing slash
3. Goto the boards "Memberlist" page (usually located at the top with the
rest of the links)
4. Search the "Memberlist" page for the specific account you wish to
change
the permissions for, and click the username, then note down the number
at the end of the page URL you are at. (u=?)
5. Fill in the details obtained where asked for in the following prompts.
ENDHTML


# Continue When user Is Ready
print "Press enter to continue:";
$continue = <STDIN>;


# Clear The Screen
&clear_screen;


# Get Input From User
print "Boards Location:\n";
print "----------------\n";
print "e.g. (http://www.domain_name.com/phpBB2 Note: no trailing
slash)\n";
print "Dont forget to use capitals if the name contains them\n";
print ":";
$board_location = <STDIN>;
chop $board_location;


print "\nUser ID:\n";
print "--------\n";
print "User ID of the user you wish to change the permissions for\n";
print "Found by clicking your profile on the Memberlist page, and\n";
print "then reading the end of the URL (where it says u=?)\n";
print ":";
$user_id = <STDIN>;
chop $user_id;


print "\nUser Level:\n";
print "-----------\n";
print "User level you wish to give to the specified user\n";
print "i.e. for admin type admin for user type user\n";
print ":";
$user_level = <STDIN>;
chop $user_level;


# Clear The Screen
&clear_screen;


# Print Out What The User Entered
print <<ENDHTML;
Details Entered
---------------
Board Location: $board_location
User ID No.: $user_id
User Level: $user_level
ENDHTML


# Confirm Details With User
print "\nIs this correct? (if it is press enter, otherwise controll-c)\n";
print ":";
$continue = <STDIN>;


print "\nWorking ...\n";


# Add One To Get The Correct User ID (not needed anymore)
#$user_id++;


# Compile Full String To Send
$post_dat="adv=&mode=user&moderator%5B1%5D=0&private%5B1%5D=0&submit=Submit&u=$user_id&userlevel=$user_level";


# Compile Full Location Of Boards Admin Page
$full_location="$board_location/admin/admin_ug_auth.php";


# Change Permissions On Specified Server
use LWP::UserAgent;
$ua = LWP::UserAgent->new;


my $req = HTTP::Request->new(POST => $full_location);
$req->content_type('application/x-www-form-urlencoded');
$req->content($post_dat);


my $res = $ua->request($req);


# Clear The Screen
&clear_screen;


print "\nFinished!\n";


# Display Final Usage Instructions
print <<ENDHTML;
Now go and log into the forum in the usual way. - If it was successful,
there will be a link at the bottom of every board page saying "Go to
Administration Panel" and additional options will appear on screen when
you are viewing a specific thread to enable you to edit or delete posts
in it etc.
ENDHTML


# print $res->as_string;


# Clear The Screen Subroutine
sub clear_screen {


for ($count=1; $count<101; $count++)
{
print "\n";
}


}

ADDITIONAL INFORMATION


The information has been provided by <mailto:[email protected]> nick
of Rootsecure.net.


איך אני יוצר ממנו קובץ פרל שאני יכול להפעיל על המחשב?
תודה מראש


                                שתף        
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד

  האשכול     מחבר     תאריך כתיבה     מספר  
  UP peeves 20.09.05 23:28 1
  up peeves 22.09.05 00:31 2
  אהה אני רואה שהשגת :) Ice Cold  22.09.05 08:31 3

       
peeves
חבר מתאריך 2.8.02
2002 הודעות, דרג אמינות חבר זה
   23:28   20.09.05   
אל הפורום  
  1. UP  
בתגובה להודעה מספר 0
 


                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד
peeves
חבר מתאריך 2.8.02
2002 הודעות, דרג אמינות חבר זה
   00:31   22.09.05   
אל הפורום  
  2. up  
בתגובה להודעה מספר 0
 


                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד
Ice Cold  לחץ כאן להצגת דירוג המשתמש
חבר מתאריך 3.8.02
28041 הודעות, 19 פידבק, 36 נקודות
   08:31   22.09.05   
אל הפורום  
  3. אהה אני רואה שהשגת :)  
בתגובה להודעה מספר 0
 
דבר איתי בערב, אני אפעיל את זה, ננסה


                                                         (ניהול: מחק תגובה)
מכתב זה והנלווה אליו, על אחריות ועל דעת הכותב בלבד

תגובה מהירה  למכתב מספר: 
 
___________________________________________________________________

___________________________________________________________________
למנהלים:  נעל | תייק בארכיון | מחק | העבר לפורום אחר | מחק תגובות | עגן אשכול
       



© כל הזכויות שמורות ל-רוטר.נט בע"מ rotter.net