W
WarManiac
Junior Mitglied
Threadstarter
- Dabei seit
- 29.07.2010
- Beiträge
- 46
- Ort
- Berlin
- Modell(e)
- 2x Nokia 5230 black navi, N8-00
- Netzbetreiber
- KD Mobile(O2)
- Firmware
- V40.0.0.003|V20.0.005|014.002.00.01
- PC Betriebssystem
- Win XP SP3 & Win 7(32/64) & Linux Debian/Suse
Da einige Leute Probleme haben oder es nicht wissen wie es geht.
aus diesem Thema: http://www.usp-forum.de/nokia-5230-forum/46429-software-von-ovi-store-auf-pc-laden.html
Interessant für diejenige die keine Datenflatrate oder ein fach nicht immer das Hand nutzten wollen zum Installieren von Programmen!
Habe ich ein kleines Programm geschrieben.
Download von Gratis/Free Prgrammen möglich.
dm und jad werden unter angaben aus dem oben genanten Post bearbeitet
zu *.dm zu sis oder sisx
jad wird die jar gedownloaded
Download hier wird immer die Aktuelle Version sein:
Sis und Jad Downloader V0.1.4.exe
Getest von mir auf Windows XP SP3 uptodate für Nokia 5230
Weiter Leute die es geteste haben auf andern Windows Betriebssystem!
Thor666 Win 7 (32 oder 64 bit nicht angeben)
Sisyphos Win 7 64 bit
Bug/Fehler/Verbesserungen bitte hier Posten!
HINWEIS:
Die Benutzung des Programms geschieht auf eigene Gefahr. Für Schäden, die durch den Gebrauch des Programms auftreten, haftet der Programmautor nicht!
Sis und Jad Downloader kann auf andern Webseiten veröffentlich werden seit aber Fair:
Quellen angaben von hier: Handy Forum - USP Mobilfunk Community
Programmautor: WarManiac
Versuch in Nächsten Version zu Bugfixen:
- downloaden automatisiert (bereite mir seit meinen Beta(internen) Version Kopfzerbrechen) in der V.0.2.1 sollte es gehen!
Edit 21.06.2011:
Wie gesagt hier ist der Quelle Text von der letzten Version V0.2.2 von mir.
Wenn ein Antivirus Programm meint da ein Virus wäre, Compile euch es selbst.
auf www.autoit.de findet ihr Autoit und eine gut übersetzt Hilfe für fast alle Funktion. So könnt ihr mit etwas lese selber überprüfen ob was passiert was ihr nicht wollt!!!
Ihr könnt auch selber Änderungen vor nehemen nur bitte postet eure Änderungen/Verbesserungen damit "Ovi-Store Downloader & Converter" besser wird!!
Wenn wer meint man hätte ja c++, Asembler oder eine andere Programmier sprache nehmene könnne warum habt ihr es denn nicht in der jeweiligen Programmiersprach geschrieben?
Quelle Text:
aus diesem Thema: http://www.usp-forum.de/nokia-5230-forum/46429-software-von-ovi-store-auf-pc-laden.html
Interessant für diejenige die keine Datenflatrate oder ein fach nicht immer das Hand nutzten wollen zum Installieren von Programmen!
Habe ich ein kleines Programm geschrieben.
Download von Gratis/Free Prgrammen möglich.
dm und jad werden unter angaben aus dem oben genanten Post bearbeitet
zu *.dm zu sis oder sisx
jad wird die jar gedownloaded
Download hier wird immer die Aktuelle Version sein:
Sis und Jad Downloader V0.1.4.exe
Getest von mir auf Windows XP SP3 uptodate für Nokia 5230
Weiter Leute die es geteste haben auf andern Windows Betriebssystem!
Thor666 Win 7 (32 oder 64 bit nicht angeben)
Sisyphos Win 7 64 bit
Bug/Fehler/Verbesserungen bitte hier Posten!
HINWEIS:
Die Benutzung des Programms geschieht auf eigene Gefahr. Für Schäden, die durch den Gebrauch des Programms auftreten, haftet der Programmautor nicht!
Sis und Jad Downloader kann auf andern Webseiten veröffentlich werden seit aber Fair:
Quellen angaben von hier: Handy Forum - USP Mobilfunk Community
Programmautor: WarManiac
Versuch in Nächsten Version zu Bugfixen:
- downloaden automatisiert (bereite mir seit meinen Beta(internen) Version Kopfzerbrechen) in der V.0.2.1 sollte es gehen!
Edit 21.06.2011:
Wie gesagt hier ist der Quelle Text von der letzten Version V0.2.2 von mir.
Wenn ein Antivirus Programm meint da ein Virus wäre, Compile euch es selbst.
auf www.autoit.de findet ihr Autoit und eine gut übersetzt Hilfe für fast alle Funktion. So könnt ihr mit etwas lese selber überprüfen ob was passiert was ihr nicht wollt!!!
Ihr könnt auch selber Änderungen vor nehemen nur bitte postet eure Änderungen/Verbesserungen damit "Ovi-Store Downloader & Converter" besser wird!!
Wenn wer meint man hätte ja c++, Asembler oder eine andere Programmier sprache nehmene könnne warum habt ihr es denn nicht in der jeweiligen Programmiersprach geschrieben?
Quelle Text:
PHP:
#RequireAdmin
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=Unbenannt.ico
#AutoIt3Wrapper_outfile=Ovi-Store Downloader & Converter Beta V0.2.2.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_UseX64=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
; #Ovi-Store Downloader & Converter Beta V0.2.2# ============================================
;
; File ................: Ovi-Store Downloader & Converter Beta V0.2.2
; File Version.........: 0.2.1
; Min. AutoIt Version..: v3.3.2.0
; Description .........: Build Version zum Downloaden und Converten von Nokia store.ovi.com
; um nicht vom Handy aus zudownladen für die jenigen die keine Daten-
; Flat haben.
;
; Author...............: WarManiac
; AutoIt Version: 3.3.6.1
; Script Function von Autoit:
; File Name............: array.au3
; File Name............: GUIConstantsEx.au3
; File Name............: WindowsConstants.au3
; File Name............: Crypt.au3
; File Name............: Security.au3
;
; ===========================================================================================
; #INDEX# ===================================================================================
; Title ...............: WinHttp
; File Name............: WinHttp.au3
; URL..................: http://winhttp.origo.ethz.ch/download
; File Version.........: 1.6.2.3
; Min. AutoIt Version..: v3.3.2.0
; Description .........: AutoIt wrapper for WinHttp functions
; Author...............: trancexx, ProgAndy
; Dll .................: winhttp.dll, kernel32.dll
; ===========================================================================================
#include "WinHttp.au3"
#include <array.au3>
#include <GUIConstantsEx.au3>
#include <EditConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#include <Crypt.au3>
#Include <Security.au3>
#include <Constants.au3>
Global $pass=IniRead('Setting.ini','OVI','PASS','')
Global $UserName=IniRead('Setting.ini','OVI','UserName','')
Global $GUI
Global $G_Socket
Global $G_Cookie
Global $headerEdit
Global $dataEdit
Opt("MustDeclareVars", 1)
Opt("GUIOnEventMode", 1)
Opt("TrayAutoPause", 0)
Opt("TrayMenuMode", 1)
Global $treffer,$hRequest
dim $treffer[1]
_Make_GUI()
_IENavigate ($GUI[1][1], "https://store.ovi.com/login",0)
While 1
Sleep(250) ; zum idel wenn nix passiert
WEnd
Func _Make_GUI()
Dim $GUI[14][2]
$GUI[0][0]='MainGUI'
$GUI[1][0]='oIE'
$GUI[2][0]='GUIActiveX'
$GUI[3][0]='Button_Browser'
$GUI[4][0]='Button_Download'
$GUI[5][0]='Button_Setting'
$GUI[6][0]='Button_Download_Ordner'
$GUI[7][0]='Input_Download_Ordner'
$GUI[8][0]='Button_Rohdaten'
$GUI[9][0]='Input_Rohdaten_Ordner'
$GUI[0][1]=GUICreate("Ovi-Store Downloader & Converter Beta V0.2.1 by WarManic nur zum Testen für www.USP-Forum.de", 1024, 580, -1, -1, $WS_SYSMENU+$WS_MINIMIZEBOX+$WS_CAPTION)
$GUI[1][1]=_IECreateEmbedded ()
$GUI[2][1]=GUICtrlCreateObj($GUI[1][1], 0, 30, 1024, 550)
$GUI[3][1]=GUICtrlCreateButton("Browser", 0, 0, 100,30)
$GUI[4][1]=GUICtrlCreateButton("Downloaden", 100, 0, 824,30)
GUICtrlSetState ( $GUI[4][1], $GUI_DISABLE )
$GUI[5][1]=GUICtrlCreateButton("Einstellungen", 924, 0, 100,30)
$GUI[6][1]=GUICtrlCreateButton("Download Ordner", 10, 35, 150,25)
$GUI[7][1]=GUICtrlCreateInput(@ScriptDir&'\Download', 170, 35, 300,25,$ES_READONLY)
$GUI[8][1]=GUICtrlCreateButton("Rohdaten speichern off", 10, 85, 150,25)
$GUI[9][1]=GUICtrlCreateInput(@ScriptDir&'\Rohdaten', 170, 85, 300,25,$ES_READONLY)
$GUI[10][1]=GUICtrlCreateButton("Username", 10, 135, 150,25)
$GUI[11][1]=GUICtrlCreateInput('', 170, 135, 300,25,$ES_READONLY)
if $UserName<>'' Then
GUICtrlSetData($GUI[11][1],$UserName)
EndIf
$GUI[12][1]=GUICtrlCreateButton("Password", 10, 185, 150,25)
$GUI[13][1]=GUICtrlCreateInput('', 170, 185, 300,25,$ES_READONLY+$ES_PASSWORD)
if $pass<>'' Then
GUICtrlSetData($GUI[13][1],$pass)
EndIf
Browser()
GUICtrlSetOnEvent($GUI[3][1], "Browser")
GUICtrlSetOnEvent($GUI[4][1], "Downloaden")
GUICtrlSetOnEvent($GUI[5][1], "Einstellungen")
GUICtrlSetOnEvent($GUI[10][1], "Usermame")
GUICtrlSetOnEvent($GUI[12][1], "Password")
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "MINIMIZEClicked")
GUISetState(@SW_SHOW,$GUI[0][1])
EndFunc
Func Usermame()
local $Usermame = InputBox("Ovi-Store", "Benutzername oder E-Mail-Adresse", "", "")
GUICtrlSetData($GUI[11][1],$Usermame)
IniWrite('Setting.ini','OVI','UserName',$Usermame)
EndFunc
Func Password()
local $passwd = InputBox("Ovi-Store", "Passwort", "", "*")
if $passwd=='' then return
local $algo
If @OSVersion = "WIN_2000" Then
$algo = $CALG_RC4
Else
$algo = $CALG_AES_256
EndIf
_Crypt_Startup()
local $sid=_Security__LookupAccountName(@UserName)
local $hKey=_Crypt_DeriveKey($sid&@UserName,$algo)
local $bEncrypted=_Crypt_EncryptData($passwd,$hKey,$CALG_USERKEY)
_Crypt_DestroyKey($hKey)
GUICtrlSetData($GUI[13][1],$bEncrypted)
IniWrite('Setting.ini','OVI','PASS',$bEncrypted)
EndFunc
Func Browser()
if IsDeclared('GUI') Then
if IsDeclared('headerEdit') Then GUICtrlDelete ( $headerEdit )
if IsDeclared('dataEdit') Then GUICtrlDelete ( $dataEdit )
GUICtrlSetState ( $GUI[3][1], $GUI_DISABLE )
GUICtrlSetState ( $GUI[5][1], $GUI_ENABLE )
For $i=6 to 13 Step 1
GUICtrlSetState ( $GUI[$i][1], $GUI_HIDE)
Next
GUICtrlSetState ( $GUI[2][1], $GUI_SHOW)
GUICtrlSetState ( $GUI[4][1], $GUI_SHOW)
AdlibRegister('_check',250)
EndIf
EndFunc
Func Einstellungen()
GUICtrlSetState ( $GUI[3][1], $GUI_ENABLE )
GUICtrlSetState ( $GUI[5][1], $GUI_DISABLE )
GUICtrlSetState ( $GUI[4][1], $GUI_HIDE)
GUICtrlSetState ( $GUI[2][1], $GUI_HIDE)
For $i=6 to 13 Step 1
GUICtrlSetState ( $GUI[$i][1], $GUI_SHOW)
Next
AdlibUnRegister('_check')
EndFunc
Func _check()
Local $TEMP
if ObjName($GUI[1][1])<>'IWebBrowser2' Then Return
if ObjName($GUI[1][1].document)<>'DispHTMLDocument' Then Return
if ObjName($GUI[1][1].document.getElementById('linkSignin'))=='DispHTMLLIElement' Then ; ist login da Anmeldung
Select
Case $GUI[1][1].document.URL<>'https://store.ovi.com/login' ; nicht auf der Login Seite
if GUICtrlRead ($GUI[4][1])<>'Du must dich einlogen' Then ; prüft auf Text sollte nicht sein
GUICtrlSetData($GUI[4][1],'Du must dich einlogen') ; dann setzt auf den Text
GUICtrlSetState ( $GUI[4][1], $GUI_DISABLE ) ; und setzt es auf inkative
EndIf
Case $GUI[1][1].document.URL=='https://store.ovi.com/login' ; ist man auf er Login seite
if GUICtrlRead ($GUI[4][1])<>'' Then ; prüft auf Text sollte nicht sein
GUICtrlSetData($GUI[4][1],'') ; dann setzt auf den Text
GUICtrlSetState ( $GUI[4][1], $GUI_DISABLE ) ; und setzt es auf inkative
if GUICtrlRead ($GUI[11][1])<>'' And GUICtrlRead ($GUI[13][1])<>'' Then
if ObjName($GUI[1][1].document.getElementById('username')) == 'DispHTMLInputElement' And _
ObjName($GUI[1][1].document.getElementById('password'))== 'DispHTMLInputElement' And _
ObjName($GUI[1][1].document.getElementById('signInBtn'))== 'DispHTMLInputElement' Then
$GUI[1][1].document.getElementById('username').value=GUICtrlRead ($GUI[11][1])
If @OSVersion = "WIN_2000" Then
Local $algo = $CALG_RC4
Else
Local $algo = $CALG_AES_256
EndIf
local $sid=_Security__LookupAccountName(@UserName)
$GUI[1][1].document.getElementById('password').value=BinaryToString(_Crypt_DecryptData(GUICtrlRead ($GUI[13][1]), $sid&@UserName, $algo))
if $GUI[1][1].document.getElementById('username').value<>'' And $GUI[1][1].document.getElementById('password').value<>'' Then
Local $Click=_IEGetObjByName ($GUI[1][1], "signInBtn")
_IEAction($Click,'click')
EndIf
EndIf
EndIf
EndIf
EndSelect
EndIf
if ObjName($GUI[1][1].document.getElementById('linkSignin'))<>'DispHTMLLIElement' Then ; ist login nicht da
if ObjName($GUI[1][1].document.getElementById('userTools'))=='DispHTMLUListElement' Then
Select
case StringReplace($GUI[1][1].document.getElementById('userTools').children(0).className,' ','')=="deviceChangeselectedhide"
if GUICtrlRead ($GUI[4][1])<>'Bitte Wählen Sie ein Handy aus!!!' Then
GUICtrlSetData($GUI[4][1],'Bitte Wählen Sie ein Handy aus!!!')
GUICtrlSetState ( $GUI[4][1], $GUI_DISABLE )
EndIf
Return
case StringReplace($GUI[1][1].document.getElementById('userTools').children(0).className,' ','')=="deviceChangeselected"
if GUICtrlRead ($GUI[4][1])=='Bitte Wählen Sie ein Handy aus!!!' Then ; prüft auf Text sollte nicht sein
GUICtrlSetData($GUI[4][1],'Downloaden') ; dann setzt auf den Text
GUICtrlSetState ( $GUI[4][1], $GUI_DISABLE ) ; und setzt es auf inkative
EndIf
EndSelect
EndIf
if StringInStr($GUI[1][1].document.URL,'store.ovi.com/content/')>=1 Then
if ObjName($GUI[1][1].document.getElementById('content'))=='DispHTMLDivElement' Then
$TEMP=StringRegExp($GUI[1][1].document.getElementById('content').innerHTML,'(?i)<LI class="price pricerange">(?-:.*?)(\d{1,9})\,(\d{2})(?-:.*?)',2)
if IsArray( $TEMP ) Then
if GUICtrlRead ($GUI[4][1])<>'Kostenpflichtige Inhalte werden nicht unterstützt!' Then
GUICtrlSetData($GUI[4][1],'Kostenpflichtige Inhalte werden nicht unterstützt!')
GUICtrlSetState ( $GUI[4][1], $GUI_DISABLE )
EndIf
Else
if GUICtrlRead ($GUI[4][1])<>'Downloaden' Then
GUICtrlSetData($GUI[4][1],'Downloaden')
GUICtrlSetState ( $GUI[4][1], $GUI_ENABLE )
EndIf
if GUICtrlRead ($GUI[4][1])=='Downloaden' And GUICtrlGetState ($GUI[4][1])==144 Then
GUICtrlSetState ( $GUI[4][1], $GUI_ENABLE )
EndIf
EndIf
Else
if StringInStr($GUI[1][1].document.URL,'store.ovi.com/content/')==0 and GUICtrlGetState ($GUI[4][1])==80 Then
GUICtrlSetState ( $GUI[4][1], $GUI_DISABLE )
EndIf
EndIf
EndIf
EndIf
EndFunc
Func CLOSEClicked()
Browser()
For $i=2 to 13 Step 1
GUICtrlSetState ( $GUI[$i][1], $GUI_HIDE)
Next
GUISetFont(10, 400, 0, "Lucida Console",$GUI[0][1],5)
Local $string= @CRLF & @CRLF &@CRLF &@CRLF & _
' Ovi-Store Downloader und Converter Beta V0.2.2' & @CRLF & @CRLF& _
' Description ..............: Zum Downloaden und Converten von Datein, von Nokia store.ovi.com'& @CRLF & _
' um nicht vom Handy aus, zudownladen für die jenigen die'& @CRLF & _
' keine Daten-Flat haben.'& @CRLF& _
' Author....................: WarManiac'& @CRLF & @CRLF& _
' Angepaste Version Author..: XXXXXXXXXXX'& @CRLF & @CRLF& _ ; hier auf euren Namen rein wenn ihr selber was änder
' Info......................: Diese Program ist geschrieben für Members von www.usp-forum.de'& @CRLF & _ ; wenn ihr selbst was ändere hier Infos rein
' Bugs und Verbesserungs Vorschläge ins www.usp-forum.de Posten'
GUICtrlCreateLabel($string,0,0,1024,580)
Sleep(2000)
Exit
EndFunc
Func MINIMIZEClicked()
GUISetState(@SW_MINIMIZE,$GUI[0][1])
EndFunc
Func Downloaden()
Local $Return,$Start_URL,$URL,$temp,$TEST,$temp1,$fileN,$Endung
AdlibUnRegister('_check')
GUICtrlSetData( $GUI[4][1],'Downloaden läuft')
GUICtrlSetState ( $GUI[3][1], $GUI_DISABLE )
GUICtrlSetState ( $GUI[4][1], $GUI_DISABLE )
GUICtrlSetState ( $GUI[5][1], $GUI_DISABLE )
GUICtrlSetState ( $GUI[2][1], $GUI_HIDE )
if GUICtrlRead ($GUI[11][1])=='' Then Local $Usermame = InputBox("Ovi-Store", "Benutzername oder E-Mail-Adresse", "", "")
if GUICtrlRead ($GUI[13][1])=='' Then Local $passwd = InputBox("Ovi-Store", "Passwort", "", "*")
if GUICtrlRead ($GUI[11][1])<>'' Then Local $Usermame = GUICtrlRead ($GUI[11][1])
if GUICtrlRead ($GUI[13][1])<>'' Then
If @OSVersion = "WIN_2000" Then
Local $algo = $CALG_RC4
Else
Local $algo = $CALG_AES_256
EndIf
local $sid=_Security__LookupAccountName(@UserName)
Local $passwd=BinaryToString(_Crypt_DecryptData(GUICtrlRead ($GUI[13][1]), $sid&@UserName, $algo))
EndIf
$treffer=StringRegExp($GUI[1][1].document.URL,'(?-:http:/|https:/)/store.ovi.com/content/(\d+)',3)
__download($treffer[0],$Usermame,$passwd)
GUICtrlSetState ( $GUI[3][1], $GUI_ENABLE )
;Browser()
;GUICtrlSetState ( $GUI[2][1], $GUI_SHOW )
;GUICtrlSetData ( $GUI[4][1],'Downloaden')
GUICtrlSetData( $GUI[4][1],'Downloaden beendet')
EndFunc
Func __download($contentID,$username='',$password='',$Agent='')
Local $sDomain,$sPage,$sAdditionalData,$hWINHTTP_STATUS_CALLBACK,$hOpen,$treffer
Local $hConnect,$hRequest,$sHeader1,$temp,$sReturned,$fileH,$sTemp
Global $headerEdit = GUICtrlCreateEdit('', 10, 40, 1004, 200, $ES_AUTOVSCROLL + $WS_VSCROLL+$ES_MULTILINE+$ES_READONLY)
Global $dataEdit = GUICtrlCreateEdit('', 10, 250, 1004, 200, $ES_AUTOVSCROLL + $WS_VSCROLL+$ES_MULTILINE+$ES_READONLY)
$sDomain = "store.ovi.com"
$sPage = "/login?contentId="
$sAdditionalData = "username="&$username&"&password="&$password&"&rememberMe=0&rememberMe=1&accessUri="
$hWINHTTP_STATUS_CALLBACK = DllCallbackRegister("__WINHTTP_STATUS_CALLBACK", "none", "handle;dword_ptr;dword;ptr;dword")
$hOpen = _WinHttpOpen("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1")
$hConnect = _WinHttpConnect($hOpen, $sDomain)
$hRequest = _WinHttpOpenRequest($hConnect, "POST", $sPage, -1, -1, -1, $WINHTTP_FLAG_SECURE)
_WinHttpSendRequest($hRequest, "Content-Type: application/x-www-form-urlencoded", $sAdditionalData)
_WinHttpReceiveResponse($hRequest)
$sHeader1 = _WinHttpQueryHeaders($hRequest)
_WinHttpSetStatusCallback($hOpen, $hWINHTTP_STATUS_CALLBACK)
$hRequest = _WinHttpOpenRequest($hConnect, "GET", '/content/'&$contentID&'/download')
_WinHttpSendRequest($hRequest)
_WinHttpReceiveResponse($hRequest)
$sHeader1 = _WinHttpQueryHeaders($hRequest)
$fileH=FileOpen(GUICtrlRead ($GUI[9][1])&'/'&$contentID&'.Header.temp',2+8)
FileWrite($fileH,$sHeader1)
FileClose($fileH)
GUICtrlSetData($headerEdit,'contentID: '&$contentID&@CRLF&$sHeader1)
Local $ContentLength =StringRegExp($sHeader1,'Content-Length: (\d+)',2)
Local $ContentType =StringRegExp($sHeader1,'Content-Type: (.*?)(?=\r)',2)
local $ContentDisposition=StringRegExp($sHeader1,'Content-Disposition: attachment; filename=(.*?)(?=\r)',2)
$ContentDisposition[1]=StringReplace($ContentDisposition[1],'"','')
$sReturned=''
Local $FileGetSize=0
$fileH=FileOpen(GUICtrlRead ($GUI[9][1])&'/'&$contentID&'.Data.temp',2+16)
If _WinHttpQueryDataAvailable($hRequest) Then
While 1
$sTemp = _WinHttpReadData($hRequest,2,2048)
if @error then ExitLoop
FileWrite($fileH,$sTemp)
$FileGetSize=$FileGetSize+(StringLen($sTemp)-2)/2
GUICtrlSetData($dataEdit,$ContentLength[1] &' / '&$FileGetSize)
WEnd
EndIf
FileClose($fileH)
Local $fileW
;----- Conveter
if $ContentType[1]=='text/vnd.sun.j2me.app-descriptor' Then
$fileH=FileOpen(GUICtrlRead ($GUI[9][1])&'/'&$contentID&'.Data.temp',0+16)
Local $temp1,$temp
While 1
$temp=FileRead($fileH,1)
if @error then ExitLoop
if $temp==Binary('0x0A') Then $temp1&[email protected]
$temp1&=BinaryToString($temp)
FileGetPos($fileH)
WEnd
GUICtrlSetData($dataEdit,$temp1)
local $URL=StringRegExp($temp1,'MIDlet-Jar-URL: (.*?)(?=\n)',2)
GUICtrlSetData($dataEdit,$URL[1])
Global $aUrl = _WinHttpCrackUrl($URL[1])
$hOpen = _WinHttpOpen("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1")
$hConnect = _WinHttpConnect($hOpen, $aUrl[2])
$hRequest = _WinHttpOpenRequest($hConnect, Default, $aUrl[6]&$aUrl[7])
_WinHttpSendRequest($hRequest)
_WinHttpReceiveResponse($hRequest)
$sHeader1 = _WinHttpQueryHeaders($hRequest)
GUICtrlSetData($headerEdit,'contentID: '&$contentID&@CRLF&$sHeader1)
Local $ContentLength =StringRegExp($sHeader1,'Content-Length: (\d+)',2)
Local $ContentType =StringRegExp($sHeader1,'Content-Type: (.*?)(?=\r)',2)
local $ContentDisposition=StringRegExp($sHeader1,'Content-Disposition: attachment; filename=(.*?)(?=\r)',2)
$ContentDisposition[1]=StringReplace($ContentDisposition[1],'"','')
Local $FileGetSize=0
$fileH=FileOpen(GUICtrlRead ($GUI[9][1])&'/'&$contentID&'.Data.1.temp',2+16)
If _WinHttpQueryDataAvailable($hRequest) Then
While 1
$sTemp = _WinHttpReadData($hRequest,2,2048)
if @error then ExitLoop
FileWrite($fileH,$sTemp)
$FileGetSize=$FileGetSize+(StringLen($sTemp)-2)/2
GUICtrlSetData($dataEdit,$ContentLength[1] &' / '&$FileGetSize)
WEnd
EndIf
FileClose($fileH)
EndIf
Switch $ContentType[1]
Case 'x-epoc/x-sisx-app'
FileMove ( GUICtrlRead ($GUI[9][1])&'/'&$contentID&'.Data.1.temp', GUICtrlRead ($GUI[7][1])&'/'& $ContentDisposition[1],1+8 )
GUICtrlSetData($dataEdit,@CRLF&'x-epoc/x-sisx-app Downloade & Converte Fertig: '&GUICtrlRead ($GUI[7][1])&'/'& $ContentDisposition[1],1)
Case 'application/java-archive'
FileMove ( GUICtrlRead ($GUI[9][1])&'/'&$contentID&'.Data.1.temp', GUICtrlRead ($GUI[7][1])&'/'& $ContentDisposition[1],1+8 )
GUICtrlSetData($dataEdit,@CRLF&'application/java-archive Downloade & Converte Fertig: '&GUICtrlRead ($GUI[7][1])&'/'& $ContentDisposition[1],1)
Case 'video/3gpp2'
$ContentDisposition[1]=StringReplace($ContentDisposition[1],'.sis.dm','.sis',-1,0)
FileMove ( GUICtrlRead ($GUI[9][1])&'/'&$contentID&'.Data.temp', GUICtrlRead ($GUI[7][1])&'/'& $ContentDisposition[1],1+8 )
GUICtrlSetData($dataEdit,@CRLF&'video/3gpp2 Downloade Fertig: '&GUICtrlRead ($GUI[7][1])&'/'& $ContentDisposition[1],1)
Case 'video/3gpp'
$ContentDisposition[1]=StringReplace($ContentDisposition[1],'.sis.dm','.sis',-1,0)
FileMove ( GUICtrlRead ($GUI[9][1])&'/'&$contentID&'.Data.temp', GUICtrlRead ($GUI[7][1])&'/'& $ContentDisposition[1],1+8 )
GUICtrlSetData($dataEdit,@CRLF&'video/3gpp Downloade Fertig: '&GUICtrlRead ($GUI[7][1])&'/'& $ContentDisposition[1],1)
Case 'audio/mpeg'
FileMove ( GUICtrlRead ($GUI[9][1])&'/'&$contentID&'.Data.temp', GUICtrlRead ($GUI[7][1])&'/'& $ContentDisposition[1],1+8 )
GUICtrlSetData($dataEdit,@CRLF&'audio/mpeg Downloade Fertig: '&GUICtrlRead ($GUI[7][1])&'/'& $ContentDisposition[1],1)
Case 'application/vnd.oma.drm.message; boundary=--boundary-1'
$fileH=FileOpen(GUICtrlRead ($GUI[9][1])&'/'&$contentID&'.Data.temp',16)
Local $fileW
$ContentDisposition[1]=StringReplace($ContentDisposition[1],'.sis.dm','.sis',-1,0)
$ContentDisposition[1]=StringReplace($ContentDisposition[1],'.mp3.dm','.mp3',-1,0)
$ContentDisposition[1]=StringReplace($ContentDisposition[1],'.mp4.dm','.mp4',-1,0)
$fileW=FileOpen(GUICtrlRead ($GUI[7][1])&'\'&$ContentDisposition[1],2+8+16)
If $fileW = -1 Then
MsgBox(0, "Fehler", "Die Datei konnte nicht geöffnet werden."&@CRLF&GUICtrlRead ($GUI[7][1])&'\'&$ContentDisposition[1])
Exit
EndIf
Local $FileGetSize=FileGetSize ( GUICtrlRead ($GUI[9][1])&'\'&$contentID&'.Data.temp' )
Local $write
$temp=''
while 1
$temp&=StringReplace(FileRead($fileH,1),'0x','')
if StringInStr($temp,'0D0A0D0A')>0 Then
ExitLoop
EndIf
WEnd
local $POS_Start=FileGetPos($fileH)
GUICtrlSetData($dataEdit,@CRLF&'1 --boundary-1',1)
GUICtrlSetData($dataEdit,@CRLF&'2 Content-Type: xxxx/xxxxx',1)
GUICtrlSetData($dataEdit,@CRLF&'3 Content-Transfer-Encoding: binary',1)
GUICtrlSetData($dataEdit,@CRLF&'4 (leer)',1)
GUICtrlSetData($dataEdit,@CRLF&'Danke für denn hinweiss vom @Edebeton'&@CRLF,1)
FileFlush($fileH)
FileSetPos($fileH, 0, $FILE_END)
FileSetPos($fileH, -1, $FILE_CURRENT)
$temp=''
for $i=99 to 0 step -1
$temp=StringReplace(FileRead($fileH,1),'0x','')&$temp
if StringInStr($temp,'0D0A2D2D626F756E646172792D312D2')>0 Then
ExitLoop
EndIf
FileSetPos($fileH, -2, $FILE_CURRENT)
Next
GUICtrlSetData($dataEdit,@CRLF&'position von "--Boundary-1--" gefunden',1)
GUICtrlSetData($dataEdit,@CRLF&'hinweis vom @Edebeton'&@CRLF,1)
Local $ENDFILE=FileGetPos($fileH)
FileFlush($fileH)
FileSetPos($fileH, 0, $FILE_BEGIN)
FileSetPos($fileH, $POS_Start, $FILE_CURRENT)
$temp=fileread($fileH,$ENDFILE-$POS_Start)
$fileW=FileOpen(GUICtrlRead ($GUI[7][1])&'\'& $ContentDisposition[1],2+16)
FileWrite($fileW,$temp)
GUICtrlSetData($dataEdit,@CRLF&'*.dm zu .* Downloade & Converte Fertig: '&GUICtrlRead ($GUI[7][1])&'\'& $ContentDisposition[1],1)
Case Else
GUICtrlSetData($dataEdit,@CRLF&'Eine unbekannte Dateiendung! '&GUICtrlRead ($GUI[9][1])&'\'&$contentID&'.*',1)
GUICtrlSetData($dataEdit,@CRLF&'Bitte wenn möglich diese beiden Datein dem Autor des Programms zu zukommen lassen auf www.usp-forum.de',1)
GUICtrlSetData($dataEdit,@CRLF&'Danke WarManiac',1)
EndSwitch
; ---- conveter ende
FileClose($fileW)
FileClose($fileH)
_WinHttpCloseHandle($hRequest)
_WinHttpCloseHandle($hConnect)
_WinHttpCloseHandle($hOpen)
DllCallbackFree($hWINHTTP_STATUS_CALLBACK)
EndFunc
Func __WINHTTP_STATUS_CALLBACK($hInternet, $iContext, $iInternetStatus, $pStatusInformation, $iStatusInformationLength)
#forceref $hInternet, $iContext, $pStatusInformation, $iStatusInformationLength
Local $sHeader, $temp,$sStatus
Switch $iInternetStatus
Case $WINHTTP_CALLBACK_STATUS_REDIRECT
$sHeader = _WinHttpQueryHeaders($hRequest)
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $sHeader = ' & $sHeader & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
EndSwitch
EndFunc
Zuletzt bearbeitet: