Jump to content

Archived

This topic is now archived and is closed to further replies.

chain

ImageShack image hoster v1

Recommended Posts

  • Administrators

There's little documentation but it was fairly straight forward to use, if you type /share file it will use a specific file. If you just type /share it pops up a file dialog and lets you find the file to share. Once down it msgs the link to the channel.

 

My only major gripe is the 0 file checking, if will attempt to upload whatever you tell it to, in my opinion it could be better served by a bit of checking to ensure its a picture. The only other thing which is more minor is that there is not a way

to not message the channel the URL, I think either give the option or echo the url so the user can paste it wherever he wants instead of the current channel.

 

 

>alias /share {  if $1 = $null {    %sharing_file = $$msfile($$msfile(C:\))  }  if $1 {    %sharing_file = $1-  }  %tempsockname = imageshack_drone $+ $rand(0,9) $+ $rand(0,9) $+ $rand(0,9) $+ $rand(0,9) $+ $rand(0,9) $+ $rand(0,9) $+ $rand(0,9) $+ $rand(0,9) $+ $rand(0,9) $+ $rand(0,9)  echo 7 Opening initial connection...  sockopen %tempsockname www.imageshack.us 80  sockmark %tempsockname filename= $+ %sharing_file  unset %sharing_file  unset %tempsockname}on 1:sockopen:imageshack_drone*:{  bset -t &postdata 1 -----------------------------18762165517410 $+ $crlf  bset -t &postdata $calc($bvar(&postdata,0) + 1) Content-Disposition: form-data; name="uploadtype" $+ $crlf $+ $crlf  bset -t &postdata $calc($bvar(&postdata,0) + 1) on $+ $crlf  bset -t &postdata $calc($bvar(&postdata,0) + 1) -----------------------------18762165517410 $+ $crlf  bset -t &postdata $calc($bvar(&postdata,0) + 1) Content-Disposition: form-data; name="fileupload"; filename=" $+ $nopath($gettok($mid($sock($sockname).mark,11),1,59)) $+ " $+ $crlf  bset -t &postdata $calc($bvar(&postdata,0) + 1) Content-Type: image/jpeg $+ $crlf $+ $crlf  bread " $+ $gettok($mid($sock($sockname).mark,10),1,59) $+ " 0 $file($gettok($mid($sock($sockname).mark,10),1,59)).size &file_contents  bcopy &postdata $calc($bvar(&postdata,0) + 1) &file_contents 1 -1  bset -t &postdata $calc($bvar(&postdata,0) + 1) $crlf $+ -----------------------------18762165517410 $+ $crlf  bset -t &postdata $calc($bvar(&postdata,0) + 1) Content-Disposition: form-data; name="url" $+ $crlf $+ $crlf  bset -t &postdata $calc($bvar(&postdata,0) + 1) paste image url here $+ $crlf  bset -t &postdata $calc($bvar(&postdata,0) + 1) -----------------------------18762165517410 $+ $crlf  bset -t &postdata $calc($bvar(&postdata,0) + 1) Content-Disposition: form-data; name="email" $+ $crlf $+ $crlf $+ $crlf  bset -t &postdata $calc($bvar(&postdata,0) + 1) -----------------------------18762165517410 $+ $crlf  bset -t &postdata $calc($bvar(&postdata,0) + 1) Content-Disposition: form-data; name="MAX_FILE_SIZE" $+ $crlf $+ $crlf  bset -t &postdata $calc($bvar(&postdata,0) + 1) 13145728 $+ $crlf  bset -t &postdata $calc($bvar(&postdata,0) + 1) -----------------------------18762165517410 $+ $crlf  bset -t &postdata $calc($bvar(&postdata,0) + 1) Content-Disposition: form-data; name="refer" $+ $crlf $+ $crlf  bset -t &postdata $calc($bvar(&postdata,0) + 1) http://imageshack.us/ $+ $crlf  bset -t &postdata $calc($bvar(&postdata,0) + 1) -----------------------------18762165517410 $+ $crlf  bset -t &postdata $calc($bvar(&postdata,0) + 1) Content-Disposition: form-data; name="brand" $+ $crlf $+ $crlf $+ $crlf  bset -t &postdata $calc($bvar(&postdata,0) + 1) -----------------------------18762165517410 $+ $crlf  bset -t &postdata $calc($bvar(&postdata,0) + 1) Content-Disposition: form-data; name="optsize" $+ $crlf $+ $crlf  bset -t &postdata $calc($bvar(&postdata,0) + 1) 320x320 $+ $crlf  bset -t &postdata $calc($bvar(&postdata,0) + 1) -----------------------------18762165517410--  sockwrite -nt $sockname POST / HTTP/1.1  sockwrite -nt $sockname Host: imageshack.us  sockwrite -nt $sockname User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; ko; rv:1.9.0.10) Gecko/2009042316 Frefox/3.0.5  sockwrite -nt $sockname Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8  sockwrite -nt $sockname Accept-Language: en-us,en;q=0.8,ko-kr;q=0.5,ko;q=0.3  sockwrite -nt $sockname Accept-Charset: EUC-KR,utf-8;q=0.7,*;q=0.7  sockwrite -nt $sockname Keep-Alive: 300  sockwrite -nt $sockname Connection: keep-alive  sockwrite -nt $sockname Referer: http://imageshack.us/?no_multi=1  sockwrite -nt $sockname Content-Type: multipart/form-data; boundary=---------------------------18762165517410  sockwrite -nt $sockname Content-Length: $bvar(&postdata,0) $+ $crlf $+ $crlf  echo 7 Sending file package...  sockwrite $sockname &postdata}on 1:sockread:imageshack_drone*:{  sockread -f %lol  if $mid(%lol,1,9) = location: {    %lol = $mid(%lol,11)    msg $active Uploaded to imageshack: http:// $+ $gettok(%lol,2,$asc(/)) $+ / $+ $gettok($gettok(%lol,2-,$asc(?)),3-,$asc(=))    unset %lol  }}

Link to comment
Share on other sites



×
×
  • Create New...