Jump to content

luger

Üye
  • Posts

    72
  • Joined

  • Last visited

Everything posted by luger

  1. Arkadaşlar biliyorsunuz ki autoit'te pragma direktifleri var.. Ama direktiflerin arasında; #pragma compile(Language, 1055) koduna benzer bir kod bulamadım.. :( Dili nasıl ayarlıyacaz bu durumda.. :( O kadar direktik arasından bu direktif nasıl olmaz anlıyamıyorum.. :( Bu arada mevcut autoit sürümüm: v3.3.12.0'dır. Resim vereyim bi tane.. :)
  2. Eline sağlık :) Çok güzel bir programa benziyor.
  3. @rojhack: Şimdilik virüs totale dosya gönderme desteklemiyor. Bu program her türlü virüs'ün açığa çıkması için yapıldı. Undetect için değil :)
  4. Günler öncesinde Virüs Total'de dosya taratılmasını sağlayıcak, kullanışlı, küçük bir araç olarak bir program tasarlıyordum. Şimdi bu sitede onun ilk versiyonunu yayınlıyorum. Bu siteden programın ileriki versiyonları için yardım da almıştım. Madem bir program yazdık onu bu site sakinleriyle de paylaşmamak ayıp olurdu. Armut(Virüs Total Online scanner) v1.0-(31.01.2014) ---------------------------------------------------- -->Masaüstünden küçük bir araç olarak virüs testi için tasarlandı. -->Drag and Drop özelliğine sahiptir. -->Şimdilik sadece '.exe' uzantılı dosyaların taranmasını kabul ediyor. -->Kodlaması 3 gün sürdü..Ne uğraştık be.. :) (Toplam 1175 satır)(675 satır kod kaldı)(500 satır silindi :)) ---------------------------------------------------------------- by luger. :) <-------------->İnitial Release<--------------> Boyut: 2.18 Mb http://www.mediafire.com/?regeb357vzwodnb Not: Bu versiyonunda daha önce Virüs Total'de taratılmış dosyayın sonuçlarını öğrenebilirsiniz. Dosya gönderme desteklememektedir. Not2: Bulduğunuz hataları, açıkları ve beğenilerinizi yazmanızdan çok memnun olurum :)
  5. @metinayhan: Güzel görünüyor. Diğer flash oyun sitelerine rakip mi olmayı düşünüyordun. Bu sitenin açılma amacını nedir? merak ettim. :) Kısa bakış sonuçları: http://www.oyunne.com/robots.txt-->içeriği: User-agent: * Disallow: /wp-admin/ Disallow: /wp-includes/ Disallow: /1/ Sitemap: http://www.oyunne.com/sitemap.xml http://www.oyunne.com/wp-content/themes/HayalOyun/-->Burada programlamada bir hata yapmışsın sanki. :) Disallow: /wp-content--> Diye eklesen nasıl olur? :) --------------------------------------------------------------------------------------------------- http://www.oyunne.com/1/--> Bir de böyle bir kısım koymuşsun. Bu ne için?
  6. @blackman12: Hocam konu açma tarihine dikkat ederseniz. Sizin mesajlarınızdan daha önce konuyu açtığım ve mesaj yolladığım görülebilir. :) Sıkıntı yok. :)   Link: http://bc.vc/18205/http://www.autoitscript.com/forum/topic/150819-virustotal-api-20-udf/ Virüs Total Api v2.0 UDF(VT.au3) [spoiler]#include-once #include "WinHttp.au3" ; #INDEX# ================================================================================================= ; Title .........: VT.au3 ; AutoIt Version : 3.3.8.1 ; Language ......: English ; Description ...: VirusTotal public API version 2.0 implementation in Autoit ;thanks to: trancexx|ProgAndy "WinHttp.au3" ||| guinness "Suggestions+Snippets ||| www.virustotal.com ;Reference https://www.virustotal.com/es/documentation/public-api ;Written by Danyfirex ;Date 12/05/2013 | Update 03/06/2013 ; #FUNCTION# ============================================================================================= ;===================CONSTANTS/CONSTANTES======================= Global Const $__sVirusTotal_Page = 'www.virustotal.com' Global Enum $eAPI_HttpOpen, $eAPI_HttpConnect Global Enum $fReport,$fScan,$fRescan,$uReport,$uScan,$Comment Global Const $tURL[6]=['/vtapi/v2/file/report','/vtapi/v2/file/scan','/vtapi/v2/file/rescan', _ '/vtapi/v2/url/report','/vtapi/v2/url/scan','/vtapi/v2/comments/put'] ;============================================================== ; #FUNCTIONS/FUNCIONES# ======================================= ;VT() ;Use respective flag($Type) ;VT(ByRef $aAPI, $Type, $sResource, $sAPIkey,$Comments="") ;flags($Type) ;$fReport = retrieve a scan report on a given file ;$fScan = submit a file for Scanning ;$fRescan = Rescan files in VirusTotal's file store ;$uReport = retrieve a scan report on a given URL ;$uScan = submit a URL for Scanning ;$Comment = Make a commnet on files and URLs ; ============================================================== ; #FUNCTION# ============================================================================================= ; Name...........: VT_Open ; Description ...: Initialize and get session handle & connection handle ; Syntax.........: VT_Open() ; guinness ; #FUNCTION# ============================================================================================= Func VT_Open() Local $aAPI[2] = [0, 0] $aAPI[$eAPI_HttpOpen] = _WinHttpOpen() If @error Then $aAPI[$eAPI_HttpOpen] = -1 $aAPI[$eAPI_HttpConnect] = _WinHttpConnect($aAPI[$eAPI_HttpOpen], $__sVirusTotal_Page) If @error Then $aAPI[$eAPI_HttpConnect] = -1 Return $aAPI EndFunc ;==>VT_Open ; #FUNCTION# ============================================================================================= ; Name...........: VT_Close ; Description ...: Close handles ; Syntax.........: VT_Close($handle) ;guinness ; #FUNCTION# ============================================================================================= Func VT_Close(ByRef Const $aAPI) _WinHttpCloseHandle($aAPI[$eAPI_HttpOpen]) _WinHttpCloseHandle($aAPI[$eAPI_HttpConnect]) Return True EndFunc ;==>VT_Close ; #FUNCTION# ============================================================================================= ; Name...........: VT ; Syntax.........: VT(ByRef $aAPI, $Type, $sResource, $sAPIkey,$Comments="") ;VT($hVirusTotal, $fReport, '20c83c1c5d1289f177bc222d248dab261a62529b19352d7c0f965039168c0654',$APIkey) ;VT($hVirusTotal, $fScan, "C:\file.exe",$APIkey) ;VT($hVirusTotal, $fRescan, hex($bHash),$APIkey) ;VT($hVirusTotal, $uReport, "http://www.virustotal.com",$APIkey) ;VT($hVirusTotal, $uScan, "http://www.google.com",$APIkey) ;VT($hVirusTotal, $Comment, hex($bHash) ,$APIkey,"Hello Word | Hola Mundo") ; Parameters....: $Resource - md5/sha1/sha256/scan_id | filename | Url | respectively for flag($Type) ; $APIkey - your API key. ; $Comments - your Comments ;Return.........; response format is a JSON object ; #FUNCTION# ============================================================================================= Func VT(ByRef $aAPI, $Type, $sResource, $sAPIkey,$Comments="") If $aAPI[$eAPI_HttpConnect] = -1 Then $aAPI = VT_Open() Select ;$fReport,$fScan,$fRescan,$uReport,$uScan,$Comment Case $Type = $fReport Return _WinHttpSimpleRequest($aAPI[$eAPI_HttpConnect], 'POST', $tURL[$Type], Default, 'resource=' & $sResource & '&key=' & $sAPIkey) Case $Type = $fScan Local $sBoundary="--------Boundary" Local $sHeaders = "Content-Type: multipart/form-data; boundary=" & $sBoundary & @CRLF Local $sData = '' $sData &= "--" & $sBoundary & @CRLF $sData &= 'Content-Disposition: form-data; name="apikey"' & @CRLF & @CRLF & $sAPIkey & @CRLF $sData &= "--" & $sBoundary & @CRLF $sData &= __WinHttpFileContent("", "file", $sResource,$sBoundary) $sData &= "--" & $sBoundary & "--" & @CRLF Return _WinHttpSimpleRequest($aAPI[$eAPI_HttpConnect], "POST", $tURL[$Type], Default, StringToBinary($sData,0), $sHeaders) Case $Type = $fRescan Return _WinHttpSimpleRequest($aAPI[$eAPI_HttpConnect], "POST", "/vtapi/v2/file/rescan", Default, "resource=" & $sResource &"&key=" & $sAPIkey) Case $Type = $uReport Return _WinHttpSimpleRequest($aAPI[$eAPI_HttpConnect], 'POST', $tURL[$Type], Default, 'resource=' & $sResource & '&key=' & $sAPIkey) Case $Type = $uScan Return _WinHttpSimpleRequest($aAPI[$eAPI_HttpConnect], 'POST', $tURL[$Type], Default, 'url=' & $sResource & '&key=' & $sAPIkey) Case $Type = $Comment return _WinHttpSimpleRequest($aAPI[$eAPI_HttpConnect], "POST", "/vtapi/v2/comments/put", Default, "resource=" & $sResource & _ "&comment=" & $Comments & "&key=" & $sAPIkey) Case Else SetError(3) EndSelect EndFunc ;==>VT[/spoiler]   Çalışan kod: #include <VT.au3> Local $hVirusTotal = VT_Open() ConsoleWrite(VT($hVirusTotal, $fScan, "oku.exe","f25133d9068704c23335fc39a7351828fa80c5dde894d731d5450cf8ab8569e8")) VT_Close($hVirusTotal) Durum: Başarılı :D   Evet. Burdan yardım eden ve etmeyen tüm arkadaşlara teşekkür ederim. Dosya karşıya istenilen biçimde gönderilmesi artık başarılıdır. :)
  7. @blackman12: Amacım ObjCreate("winhttp.winhttprequest.5.1") ifadesini kullanmaktı. Öbür türlü ise hiç sizin verdiğiniz linkteki gibi bişeyle karşılaşmamıştım. Virüs total'ın kendi programını kullanarak smilüte yapmaya çalışıyordum :D Evet sizin verdiğiniz linktekini denedim.  Durum : Başarılı :D görünüyor. :)
  8. @pairs: Sona ulaşamamışlar hocam. İnşallah biz ulaşıcaz. Bişeyler buldum. Birazdan yayınlayacam. ------------------------------------------------------------------------------------------------------------------------------------------- İlk önce python api bilgisi: import postfile host = "www.virustotal.com" sec = "https://www.virustotal.com/vtapi/v2/file/scan" fields = [("apikey", "ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb")] dosya_to_send = open("test.txt", "rb").read() dosya = [("file", "test.txt", dosya_to_send)] sonuc = postfile.post_multipart(host, sec, fields, dosya) print sonuc {"response_code": 1, "verbose_msg": "Scan request successfully queued, come back later for the report", "resource": "999f7d93aa3d4a1a94cccfb4ea96bc2e28fd48020a481aa2dc7e215f3ce27bc0", "scan_id": "999f7d93aa3d4a1a94cccfb4ea96bc2e28fd48020a481aa2dc7e215f3ce27bc0-1324376258", "permalink": "https://www.virustotal.com/file/999f7d93aa3d4a1a94cccfb4ea96bc2e28fd48020a481aa2dc7e215f3ce27bc0/analysis/1324376258/", "sha256": "999f7d93aa3d4a1a94cccfb4ea96bc2e28fd48020a481aa2dc7e215f3ce27bc0", "sha1": "2cc875bca8030d745adfd14388b8c001471c2474", "md5": "4a00e1a3a14e4fec6f2b353b4f20bb73"} post_multipart tanımlama kodları python: [spoiler]import httplib, mimetypes def post_multipart(host, selector, fields, files): """ Post fields and files to an http host as multipart/form-data. fields is a sequence of (name, value) elements for regular form fields. files is a sequence of (name, filename, value) elements for data to be uploaded as files Return the server's response page. """ content_type, body = encode_multipart_formdata(fields, files) h = httplib.HTTP(host) h.putrequest('POST', selector) h.putheader('content-type', content_type) h.putheader('content-length', str(len(body))) h.endheaders() h.send(body) errcode, errmsg, headers = h.getreply() return h.file.read() def encode_multipart_formdata(fields, files): """ fields is a sequence of (name, value) elements for regular form fields. files is a sequence of (name, filename, value) elements for data to be uploaded as files Return (content_type, body) ready for httplib.HTTP instance """ BOUNDARY = '----------ThIs_Is_tHe_bouNdaRY_$' CRLF = '\r\n' L = [] for (key, value) in fields: L.append('--' + BOUNDARY) L.append('Content-Disposition: form-data; name="%s"' % key) L.append('') L.append(value) for (key, filename, value) in files: L.append('--' + BOUNDARY) L.append('Content-Disposition: form-data; name="%s"; filename="%s"' % (key, filename)) L.append('Content-Type: %s' % get_content_type(filename)) L.append('') L.append(value) L.append('--' + BOUNDARY + '--') L.append('') body = CRLF.join(L) content_type = 'multipart/form-data; boundary=%s' % BOUNDARY return content_type, body def get_content_type(filename): return mimetypes.guess_type(filename)[0] or 'application/octet-stream'[/spoiler]   Autoit multipart dönüşümü yaklaşık: [spoiler]#include-once #include #include $USE_MIMETYPEFILE = 0 Global $MIMETypes[8][2] = [ _ ["bmp", "image/bmp"], _ ["gif", "image/gif"], _ ["jpe", "image/jpeg"], _ ["jpeg", "image/jpeg"], _ ["jpg", "image/jpeg"], _ ["png", "image/png"], _ ["tif", "image/tiff"], _ ["tiff", "image/tiff"]] _SortMIMETypes() ;~ Local $form_fields[2][2] = [["password", "PW123"],["filename", "test.bmp"]] Local $form_fields = 0 Local $form_files[1][2] = [["fileupload", "D:\test.bmp"]] $x = post_multipart("http://www.imageshack.us/index.php", "", $form_fields, $form_files) ConsoleWrite(">Body: " & @CRLF & $x[1] & @CRLF) #include ;~ ConsoleWrite(">Header: " & @CRLF & $x[0] & @CRLF & @CRLF) ;~ ConsoleWrite(">Body: " & @CRLF & $x[1] & @CRLF) If Not IsDeclared("MIMETypes") Then Global $MIMETypes If Not IsDeclared("USE_MIMETYPEFILE") Then $USE_MIMETYPEFILE = 1 ; Prog@ndy Func _LoadMimeTypes() Global $MIMETypes[200][2] Local $line If Not FileExists(@ScriptDir & "\MIMETypes.txt") Then If MsgBox(36, 'PostData', "MIMETYpes.txt fehlt. Downloaden?") = 6 Then InetGet("http://pastebin.com/pastebin.php?dl=f7401663f", @ScriptDir & "\MIMETypes.txt") EndIf EndIf $mime = FileOpen(@ScriptDir & "\MIMETypes.txt", 0) For $i = 0 To 199 $line = FileReadLine($mime) If @error = -1 Then ExitLoop $line = StringSplit($line, @TAB) $MIMETypes[$i][0] = $line[1] $MIMETypes[$i][1] = $line[2] Next FileClose($mime) If $i < 1 Then $i = 1 ReDim $MIMETypes[$i][2] _SortMIMETypes() EndFunc ;==>_LoadMimeTypes If $USE_MIMETYPEFILE Then _LoadMimeTypes() Func _SortMIMETypes() _ArraySort($MIMETypes, 0, 0, 0, 2) EndFunc ; #FUNCTION# ;=============================================================================== ; ; Name...........: _WinHttpWriteDataBin ; Description ...: Writes request data to an HTTP server. ; Syntax.........: _WinHttpWriteData($hRequest, $string) ; Parameters ....: $hRequest - Valid handle returned by _WinHttpSendRequest(). ; $binary - Binary data to write. ; Return values .: Success - Returns 1 ; - Sets @error to 0 ; - sets @extended to written bytes ; Failure - Returns 0 and sets @error: ; |1 - DllCall failed. ; Author ........: trancexx ; Modified.......: ProgAndy ; Remarks .......: ; Related .......: ; Link ..........; http://msdn.microsoft.com/en-us/library/aa384120(VS.85).aspx ; Example .......; Yes ; ;========================================================================================== Func _WinHttpWriteDataBin($hRequest, $binary) Local $lpBinary Local $iNumberOfBytesToWrite If IsDllStruct($binary) Then $lpBinary = DllStructGetPtr($binary) $iNumberOfBytesToWrite = DllStructGetSize($binary) Else $iNumberOfBytesToWrite = BinaryLen($binary) Local $sBinary = DllStructCreate("byte[" & $iNumberOfBytesToWrite & "]") DllStructSetData($sBinary, 1, $binary) $lpBinary = DllStructGetPtr($sBinary) EndIf Local $a_iCall = DllCall("Winhttp.dll", "int", "WinHttpWriteData", _ "hwnd", $hRequest, _ "ptr", $lpBinary, _ "dword", $iNumberOfBytesToWrite, _ "dword*", 0) If @error Or Not $a_iCall[0] Then Return SetError(1, 0, 0) EndIf Return SetError(0, $a_iCall[4], 1) EndFunc ;==>_WinHttpWriteDataBin #cs post_multipart and encode_multipart_formdata translated from the cookbook see ActiveState's ASPN http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146306 #ce Func post_multipart($host, $selector, ByRef $fields, ByRef $files) ;~ """ ;~ Post fields and files to an http host as multipart/form-data. ;~ fields is a sequence of (name, value) elements for regular form fields. ;~ files is a sequence of (name, filename, value) elements for data to be uploaded as files ;~ Return the server's response page. ;~ """ Local $Return = encode_multipart_formdata($fields, $files) Local $content_type = 'Content-Type: ' & $Return[0] & @CRLF ;~ $body = $Return[1] Local $URL = _WinHttpCrackUrl($host) Local $hSession = _WinHttpOpen() Local $hConnection = _WinHTTPConnect($hSession,$URL[2],$URL[3]) ConsoleWrite( $content_type&@CRLF) ;~ ConsoleWrite( StringReplace($Return[1],Chr(0),".")&@CRLF) ;~ $s = StringToBinary($Return[1]) ;~ ConsoleWrite( BinaryLen($s) & "--" & StringLen($Return[1])) ;~ Return Local $hRequest = _WinHttpOpenRequest($hConnection,"POST",$URL[6]&$URL[7],"HTTP/1.1","http://"&$URL[2]) _WinHttpSendRequest($hRequest,$content_type,$WINHTTP_NO_REQUEST_DATA,StringLen($Return[1]));,StringLen($Return[1])) _WinHTTPWriteDataBin($hRequest,StringToBinary($Return[1])) MsgBox(0, '', @error) _WinHttpReceiveResponse($hRequest) Local $Return[2] If _WinHttpQueryDataAvailable($hRequest) Then Local $temp While 1 $temp = _WinHttpReadData($hRequest) If $temp = "" Then ExitLoop $Return[1] &=$temp WEnd $temp ="" ; Does not work since @error is 0, when no more data is available ;~ Do ;~ $Return[1] &= _WinHttpReadData($hRequest) ;~ Until @error <> 0 EndIf $Return[0] = _WinHttpQueryHeaders($hRequest) _WinHttpCloseHandle($hRequest) _WinHttpCloseHandle($hConnection) _WinHttpCloseHandle($hSession) Return $Return EndFunc ;==>post_multipart ; Prog@ndy Func encode_multipart_formdata($fields, $files) ;~ """ ;~ fields is a sequence of (name, value) elements for regular form fields. ;~ files is a sequence of (name, filename, value) elements for data to be uploaded as files ;~ Return (content_type, body) ready for httplib.HTTP instance ;~ """ Local Const $BOUNDARY = 'ThIs_Is_tHe_bouNdaRY_$' ;~ CRLF = '\r\n' $L = "" For $i = 0 To UBound($fields) - 1 $L &= ('--' & $BOUNDARY) & @CRLF $L &= ('Content-Disposition: form-data; name="' & $fields[$i][0] & '"') & @CRLF $L &= @CRLF $L &= $fields[$i][1] & @CRLF Next For $i = 0 To UBound($files) - 1 $L &= ('--' & $BOUNDARY) & @CRLF $L &= ('Content-Disposition: form-data; name="' & $files[$i][0] & '"; filename="' & $files[$i][1] & '"') & @CRLF $content_type = get_content_type($files[$i][1]) $L &= ('Content-Type: ' & $content_type) & @CRLF $L &= @CRLF ;~ If StringLeft($content_type, 5) <> "text/" Then ;~ $f = FileOpen($files[$i][1], 16) ;~ $L &= BinaryToString(FileRead($f)) & @CRLF ;~ FileClose($f) ;~ Else $L &= FileRead($files[$i][1]) & @CRLF ;~ EndIf Next $L &= ('--' & $BOUNDARY & '--') & @CRLF $L &= @CRLF $content_type = 'multipart/form-data; boundary="' & $BOUNDARY & '"' Local $Return[2] = [$content_type, $L] ;~ return content_type, body Return $Return EndFunc ;==>encode_multipart_formdata ; Prog@ndy Func get_content_type($path) ;~ Return "application/octet-stream" Local $szExt = StringLower(StringRegExpReplace(,".*(?:\.([^.\\/]*))?\Z","$1")) ;~ ConsoleWrite(StringTrimLeft($szExt, 1) & @CRLF) If $szExt = "" Then Return 'application/octet-stream' Local $mimeid = _ArrayBinarySearch2D($MIMETypes, $szExt) ;~ ConsoleWrite($mimeid & @error & @CRLF) If $mimeid = -1 Then Return SetError(1, 0, 'application/octet-stream') Return $MIMETypes[$mimeid][1] EndFunc ;==>get_content_type ;=============================================================================== ; ; Function Name: _ArrayBinarySearch() ; Description: Uses the binary search algorithm to search through a ; 1-dimensional array. ; Author(s): Jos van der Zande ; Modified: Prog@ndy ; ;=============================================================================== Func _ArrayBinarySearch2D(Const ByRef $avArray, $vValue, $iStart = 0, $Column = 0, $iEnd = 0) If Not IsArray($avArray) Then Return SetError(1, 0, -1) Local $iUBound = UBound($avArray) - 1 ; Bounds checking If $iEnd < 1 Or $iEnd > $iUBound Then $iEnd = $iUBound If $iStart < 0 Then $iStart = 0 If $iStart > $iEnd Then Return SetError(4, 0, -1) Local $iMid = Int(($iEnd + $iStart) / 2) If $avArray[$iStart][$Column] > $vValue Or $avArray[$iEnd][$Column] < $vValue Then Return SetError(2, 0, -1) ; Search While $iStart <= $iMid And $vValue <> $avArray[$iMid][$Column] If $vValue < $avArray[$iMid][$Column] Then $iEnd = $iMid - 1 Else $iStart = $iMid + 1 EndIf $iMid = Int(($iEnd + $iStart) / 2) WEnd If $iStart > $iEnd Then Return SetError(3, 0, -1) ; Entry not found Return $iMid EndFunc ;==>_ArrayBinarySearch2D[/spoiler]
  9. Kullanacağımız Winhttp(14.01.2014)sürümü: https://autoit-winhttp.googlecode.com/files/1.6.3.7.zip Fonksiyonlar: ;_WinHttpAddRequestHeaders ;_WinHttpCheckPlatform ;_WinHttpCloseHandle ;_WinHttpConnect ;_WinHttpCrackUrl ;_WinHttpCreateUrl ;_WinHttpDetectAutoProxyConfigUrl ;_WinHttpGetDefaultProxyConfiguration ;_WinHttpGetIEProxyConfigForCurrentUser ;_WinHttpOpen ;_WinHttpOpenRequest ;_WinHttpQueryAuthSchemes ;_WinHttpQueryDataAvailable ;_WinHttpQueryHeaders ;_WinHttpQueryOption ;_WinHttpReadData ;_WinHttpReceiveResponse ;_WinHttpSendRequest ;_WinHttpSetCredentials ;_WinHttpSetDefaultProxyConfiguration ;_WinHttpSetOption ;_WinHttpSetStatusCallback ;_WinHttpSetTimeouts ;_WinHttpSimpleBinaryConcat ;_WinHttpSimpleFormFill ;_WinHttpSimpleReadData ;_WinHttpSimpleReadDataAsync ;_WinHttpSimpleRequest ;_WinHttpSimpleSendRequest ;_WinHttpSimpleSendSSLRequest ;_WinHttpSimpleSSLRequest ;_WinHttpTimeFromSystemTime ;_WinHttpTimeToSystemTime ;_WinHttpWriteData  Bir önceki  http://www.tnctr.com/topic/241738-autoit-fileread-exeyi-string-olarak-okumuyor/ konusundan geliyorum. Yanlış anlaşılmasın yan odadan değil. Yan konudan :D   Gönderilmek istenen dosya:http://tr.rghost.net/52173713   (Bi gönderilemedi gitti :D )   Beraber tartışalım. Nasıl yapabiliriz. Ben yeni kodlar eklerim konuya :D   Ayrıca sitede aradım sanırım winhttp'ye pek değinilmemiş.
  10. Evet. Artık bu konuyu bir sonuca bağlamalıyız. Öyle inanıyorum ki "$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")" durumunda veri göndermede string olarak bir sonuca varamıyacaz. Autoit hex olarak "00" ı, char olarak "0" ı süzüyor böylelikle msgbox'ta veya consolewrite'de bişey görmüyoruz.(Ayrıca $oHTTP.Send($veri) ifadesindede süzme gerçekleşiyor ki maşallah süzmediği yer yok :D ) Ben ilk başlarda durumun okuyamamaktan veya string içerisinde tutumamaktan kaynaklandığını düşünüyordum. Artık düşüncem değişti. Veri hem string olarak okunuyor hem de değişkende tutuluyor. Bunun ispatı ise elde edilen verinin  "Filewrite" ile yazılması. Benim gibi illa veriyi görmek istiyorum diyorsanız aşağıda yapılmış örneğini veriyorum. #include <File.au3> #include <String.au3> $dosya=FileOpen("oku.exe", 0) $string=FileRead($dosya) $string=StringReplace($string, Chr(0), chr(1), 0) MsgBox(0, "", $string) Ayrıca @MostWanted arkadaşıma teşekkür ederim. Bu işin içeriğinden o bana bahsetti.   Evet yeni maceralara akmak gerek. Winhttp'ye geçiyoruz. :D
  11. Elde edilen son hal: Kaç saattir uğraşıyorum. Ancak yukarıdaki hale getirebildim. Orjinal olması gereken ise aşağıdaki gibi. Hayır o değilde aşağıdaki dosyaya gönderme aşamasında başına ne gelmiş olabilir ki bir türlü o hale sokamadık. :D Yolda kaza mı geçirdi ne oldu :D :D :D Gerçi kusura bakmayın yukardaki daha fazla kaza geçirmiş gibi duruyor ama. :D :D Orjinal hal :
  12. @Erasmus: Autoit'in @OSVersion özelliğini kullan ve farklı sistemleri tanıyıp ona göre kod akışını değiştirmeyi sağla. Bu güzel çözüm olur :)
  13. Okunan String verinin ConsoleWrite ile yazılmaya çalışılması sonucu: :D Durum: Başarısız :D #include <String.au3> #include <File.au3> $open = FileOpen("oku.exe", $FO_READ) $size = FileGetSize ("oku.exe") $string = FileRead ("oku.exe", $size) ConsoleWrite(@CR&$string) String olarak şu veriyi bir elde göremedik gitti. :fkyeah: <_< :D
  14. @blackman12:  MostWanted arkadaşımızın isteği üzerine python api kodlarını verdim. O api kodlarının gerçekte nasıl çalıştığını hiç bilmiyorum ve denemedim. Python dilini de bilmiyorum :) Kodlara aldanmamak lazım :D   Ben tam olarak o kodlara göre similüte yapmıyorum. Bu işi yapan sitenin yazdığı kendi programı var. Ben ordan similüte yapıyordum :D   İlla hocam site adı diye tutturdunuz.  Site: Virüs Total Api'sidir. Şu anda kendimi tarihi bişey açıklıyorum gibi hissediyorum. :D   Öğrenmek için çok uğraştınız be hocam. Ne çektiniz be.. :D ---------------------------------------------------------------------------------------------------------------------------------- Ayrıca aşağıdaki koda dikkat ederseniz "apikey" / $string değişkeninden sonra yer alıyor $dosya_adi='"oku.exe"' $veri="-----------------------------31972514120" & @CRLF & _ 'Content-Disposition: form-data; name="file"; filename='& $dosya_adi & @CRLF & _ 'Content-Type: application/x-msdownload' &@CRLF&@CRLF& _ $string & @CRLF & _ "-----------------------------31972514120" & @CRLF & _ 'Content-Disposition: form-data; name="apikey"' & @CRLF & @CRLF & _ "" & @CRLF & _ "-----------------------------31972514120--" & @CRLF
  15. @blackman12: Dosyayı binary olarak açtım ve gönderdim. Gönderim şekli aşağıdaki gibi. :) $dosya=FileOpen($adres, 16) $string=FileRead($dosya) Olması gereken(Biliyorsunuz :D) :
  16. @MostWanted: Hocam konum tam. :) En başta işi sağlam tutup linkini vermiştim. Exe konumun başında. :)
  17. @MostWanted: Neyi buraya koymalıyım. Anlıyamadım :) Ayrıca winhttp'de de dosyayı okuyup string olarak elde tutamamaktan korkuyorum :D
  18. @MostWanted: Örnek aşağıdaki gibi. Ama kod farklı gelebilir. Açıkçası python kodlarını hiç bilmiyorum. :) import postfile host = "site_adi" sec = "yükleme_linki" fields = [("apikey", "ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb")] dosya_to_send = open("test.txt", "rb").read() dosya = [("file", "test.txt", dosya_to_send)] sonuc = postfile.post_multipart(host, sec, fields, dosya) print sonuc
  19. @blackman12: Api desteği için örnek vermiş. Ama Python dilinde. Bizde simülite etmeye çalışıyoruz. :D Durum yukarıdaki gibi. Yazdırmada sorun çıkmadı. Çalıştırmada çalıştı. Ama nasıl Msgbox'ta string veriyi göremiyorsam veriyi göndermedede giden veriyi göremiyorum. Veriyi görebilmem ve elle tutabilmem çok önemli :) ben görmeyince programda görmüyor. :D $open = FileOpen("oku.exe", 16) $size = FileGetSize ("oku.exe") $string = FileRead ("oku.exe", $size) ConsoleWrite(@extended) FileWrite("Test.txt", $string) ;Test.txt'den .exe'ye dönüştürüldü. $open2 = FileOpen("Test.exe", 16) $size2 = FileGetSize ("Test.exe") $string2 = FileRead ("Test.exe", $size2) ConsoleWrite(@CR&@extended&@cr) Veri giderken olması gereken: Yukarıda ilk 4 no hariç geri kalan @LF ile olmaktadır. Gerçekte olan : :D
  20. @blackman12: Hocam ben bu kodlarla ilk upload yapan kişi olarak tarihe geçmek istiyordum. :) Winhttp'de kodları şimdi tekrar yazmam gerekecek ve sanırım verdiğiniz linkte konunun başında "FileRead($FileHandle)" fonksiyonu değişken içerisinde kullanılmış.Yani hata vericek. Ve bunun gibi bir sürü başka hatalar var gibi. (Bi de "Binary($sData)" yapılıyor gönderirken)  :) Tek çare winhttp diyormusunuz hocam? :D
  21. @blackman12: Evet hocam dosya upload yapıcaktım. Oraya "site_adi" şeklinde yazdım. :) Ad vermek istesem verirdim :) Ama sorum dosyayı string olarak okumak olduğundan dolayı verdiğim bilgilerin yeterli olduğunu düşünüyorum. :) @radyofon: Durum 1: FileReadLine denemesi FileReadline'de tek tek satır okuyor gibi. Ama satırları birbirine eklemede veriyi yine elde göremiyorum. Ayrıca string satır okuma olursa asıl satır ayırması @LF durumuna göre olmalı. Diğer durumlar işe yaramıyor. Ama satırları bir tek değişkende görüp tutabilirsem @LF ayrımını kendim de yapabilirim. :) #include <File.au3> #include <String.au3> $dosya=FileOpen("oku.exe", 0) Local $k, $ekle, $ekle_sira For $k=1 To _FileCountLines("oku.exe") $ekle_sira= FileReadLine($dosya, $k) $ekle&= FileReadLine($dosya, $k) MsgBox(0, $k, $ekle_sira) MsgBox(0, $k, $ekle) Next Durum 2: Aşağıdaki dediğin konu başındaki yazımla aynı. ( 0=$FO_READ ) :) Ayrıca Teşekkür ederim herkese yardımları için..
  22. En baştan beri " Download with ziddu accelerator and get recommended offers." işaretini kaldırarak indirme yapıyorum. Saate göre durum aşağıdaki gibidir :) Ayrıca hocam ölü linkleri raporlarım bir dahikene böyle kural olduğunu bilmiyordum. :(
  23. Dosyayı indirdiğimde 1 Kb görünüyor. Dosyayı indiremiyorum. Başka bir link vermeniz mümkün müdür? :)
  24. Teşekkür ederim çok güzel bir program. Hele alt klasörleride listelemesi çok güzel.. :)
  25. Programı kablolu ağda denedim şu an çalışıyor. Teşekkür ederim.  Çalışan link:http://www.mediafire.com/?243yuvsd2s8ysgr
×
×
  • Create New...