We probably had a few of these in the past but since i had some free time I thought it would be a good idea to code one :)
Use left click to open the link in the browser, right click to copy the link in the clipboard.
Screenshot (2.6mb)
![[Image: rDjrY.gif]](https://i.imgur.com/rDjrY.gif)
VT scan
File name:
Imgur uploader.rar
Submission date:
2011-10-15 15:23:31 (UTC)
Current status:
finished
Result:
0/ 43 (0.0%)
Antivirus Version Last Update Result
AhnLab-V3 2011.10.13.00 2011.10.13 -
AntiVir 7.11.15.252 2011.10.13 -
Antiy-AVL 2.0.3.7 2011.10.13 -
Avast 6.0.1289.0 2011.10.13 -
AVG 10.0.0.1190 2011.10.13 -
BitDefender 7.2 2011.10.13 -
ByteHero 1.0.0.1 2011.09.23 -
CAT-QuickHeal 11.00 2011.10.13 -
ClamAV 0.97.0.0 2011.10.13 -
Commtouch 5.3.2.6 2011.10.13 -
Comodo 10440 2011.10.13 -
DrWeb 5.0.2.03300 2011.10.12 -
Emsisoft 5.1.0.11 2011.10.13 -
eSafe 7.0.17.0 2011.10.11 -
eTrust-Vet 36.1.8617 2011.10.13 -
F-Prot 4.6.5.141 2011.10.13 -
F-Secure 9.0.16440.0 2011.10.13 -
Fortinet 4.3.370.0 2011.10.13 -
GData 22 2011.10.13 -
Ikarus T3.1.1.107.0 2011.10.13 -
Jiangmin 13.0.900 2011.10.12 -
K7AntiVirus 9.115.5278 2011.10.13 -
Kaspersky 9.0.0.837 2011.10.13 -
McAfee 5.400.0.1158 2011.10.13 -
McAfee-GW-Edition 2010.1D 2011.10.13 -
Microsoft 1.7702 2011.10.13 -
NOD32 6541 2011.10.13 -
Norman 6.07.11 2011.10.13 -
nProtect 2011-10-13.01 2011.10.13 -
Panda 10.0.3.5 2011.10.13 -
PCTools 8.0.0.5 2011.10.13 -
Prevx 3.0 2011.10.15 -
Rising 23.79.03.02 2011.10.13 -
Sophos 4.70.0 2011.10.13 -
SUPERAntiSpyware 4.40.0.1006 2011.10.13 -
Symantec 20111.2.0.82 2011.10.13 -
TheHacker 6.7.0.1.322 2011.10.13 -
TrendMicro 9.500.0.1008 2011.10.13 -
TrendMicro-HouseCall 9.500.0.1008 2011.10.13 -
VBA32 3.12.16.4 2011.10.13 -
VIPRE 10749 2011.10.13 -
ViRobot 2011.10.13.4717 2011.10.13 -
VirusBuster 14.1.11.0 2011.10.13 -
Additional information
MD5 : 92e81cc4a2edd86b63be8c41687c282d
SHA1 : 3b13c6e1b69d311cd176bfc9c20952bbf5437e75
SHA256: 7da592b5c25a2e0968eb41a0a370fa94d6fddef982c333c2722628aa6917935d
Link
Download link
Download
If i forgot anything let me know :)
Oct 16, 2011 10:10 AM
(This post was last modified: Oct 16, 2011 10:10 AM by ScreamX.)
Is there a limit to the size of the image? I was working on a screenshot program that auto uploaded to imgur. I kept getting a "URI is too long" error.
<?php echo "I'm a professional web developer, if you need something ask me."; ?>
The Mediafire link doesn't work & You don't scan the .rar file you scan the .exe :c
Hi
Is there any chance that you can C/P the sourcecode in here, so i can take a look at it and learn from it?
Thanks (:
look here.
http://api.imgur.com/examples
anyway ... it not work.
it convert all my PNG to BLACK pictures.
so i have another methood :P
[fixed and compact code now]
Helper's
Code /// <summary>
/// helper
/// </summary>
/// <param name="boundray"></param>
/// <param name="ContentDisposition"></param>
/// <param name="data"></param>
/// <returns></returns>
private string AddFormData(string boundray, string ContentDisposition, string data)
{
return string.Format("{0}\n{1}\n\n{2}",
boundray,
string.Format("Content-Disposition: form-data; name=\"{0}\"", ContentDisposition),
data);
}
/// <summary>
/// helper
/// </summary>
/// <param name="boundray"></param>
/// <param name="name"></param>
/// <param name="filename"></param>
/// <param name="data"></param>
/// <returns></returns>
private string AddFormData(string boundray, string name, string filename, string data)
{
if (filename == null)
{
return string.Format("{0}\n{1}\n{2}\n",
boundray,
string.Format("Content-Disposition: form-data; name=\"{0}\"", name, filename),
data);
}
else
{
return string.Format("{0}\n{1}\n{2}\n",
boundray,
string.Format("Content-Disposition: form-data; name=\"{0}\"; filename=\"{1}\"", name, filename),
data);
}
}
main code
Code string
/* URI */
requestUriString = string.Empty,
/* SPLIT */
boundray = DateTime.Now.Ticks.ToString(),
lines = string.Empty,
boundray_lines = string.Empty,
/* FILE NAME */
fileName = Path.GetRandomFileName(),
ext = fileName.Split('.')[1],
/* RESULT FROM SERVER */
input = string.Empty;
byte[]
bytes = null,
buffer = null,
sBytes = null;
StringBuilder builder = new StringBuilder();
MemoryStream ms = new MemoryStream();
HttpWebRequest request = null;
Regex regex = null;
fileName = fileName.Replace(ext, "png");
img.Save(ms, ImageFormat.Png);
// main code now
{
string hash = string.Empty;
string sid = string.Empty;
using (WebClient client = new WebClient())
{
hash = client.DownloadString("http://www.imgur.com/");
int index = hash.IndexOf("var sid_hash = '") + ("var sid_hash = '").Length;
hash = hash.Substring(index, hash.Length - index);
index = hash.IndexOf("';");
hash = hash.Substring(0, index);
sid = client.ResponseHeaders["Set-Cookie"].Split(';')[0].Split('=')[1];
}
lines = new string('-', 12);
boundray_lines = lines + boundray;
requestUriString = string.Format("https://imgur.com/upload?sid_hash={0}", hash);
builder.AppendLine(AddFormData(boundray_lines, "Filename", fileName));
builder.AppendLine(AddFormData(boundray_lines, "layout", "b"));
builder.AppendLine(AddFormData(boundray_lines, "create_album", "0"));
builder.AppendLine(AddFormData(boundray_lines, "edit", "0"));
builder.AppendLine(AddFormData(boundray_lines, "catify", "0"));
builder.AppendLine(AddFormData(boundray_lines, "sid", sid));
builder.AppendLine(AddFormData(boundray_lines, "album_title", "Optional Album Title"));
builder.AppendLine(AddFormData(boundray_lines, "Filedata", "fileName", "Content-Type: application/octet-stream"));
bytes = Encoding.UTF8.GetBytes(builder.ToString());
builder = new StringBuilder();
buffer = ms.ToArray();
ms.Dispose();
builder.AppendLine();
builder.AppendLine(AddFormData(boundray_lines, "Upload", "Submit Query"));
builder.AppendLine(boundray_lines + "--");
sBytes = Encoding.UTF8.GetBytes(builder.ToString());
builder = new StringBuilder();
request = (HttpWebRequest)WebRequest.Create(requestUriString);
//request.CookieContainer = Container;
request.Method = "POST";
request.KeepAlive = true;
request.ContentType = "multipart/form-data; boundary=" + lines.Remove(0, 2) + boundray;
request.ContentLength = bytes.Length + buffer.Length + sBytes.Length;
request.ServicePoint.Expect100Continue = false;
request.UserAgent = "Shockwave Flash";
using (Stream stream = request.GetRequestStream())
{
stream.Write(bytes, 0, bytes.Length);
stream.Write(buffer, 0, buffer.Length);
stream.Write(sBytes, 0, sBytes.Length);
stream.Close();
}
input = new StreamReader(request.GetResponse().GetResponseStream()).ReadToEnd();
input = input.Split('\\')[1].Split('\\')[0].Remove(0, 1);
using (WebClient client = new WebClient())
{
input = client.DownloadString(
string.Format("https://imgur.com/{0}", input));
}
regex = new Regex("http://i(.*?)imgur.com/.*(.png)");
result = regex.Matches(input)[0].ToString();
}
Oct 16, 2011 09:08 PM
(This post was last modified: Oct 17, 2011 03:07 AM by dreamer66.)
Sorry for the late reply I was away for the day. Does it do that with all the .png photos ? Since i cant duplicate the issue here (works fine with .png here).
Also are you on winxp or win vista/7 ? (Not that it should matter since it works on my VM but checking either way :p).
Edit: VT for the .exe link
New mediafire link.
awesome!! thank you so much for this!
No worries, made my life easier as well :p Too bad i cant have the a progress bar working for that without using .net framework 4. Would be nice to have an indication when the upload is going to finish, not that it takes long :p
Here's the Minus API, please check it out if anyone is interested ;)
http://minus.com/pages/api
Oct 19, 2011 09:32 PM
(This post was last modified: Oct 19, 2011 09:37 PM by dreamer66.)
Looks pretty good, the only issue i have with it is the 30days expiration for users with no account and the need to enter an email before uploading the picture :(
Also the link under "Where can you find the API?" doesnt seem to work, https://minus.com/api/v2/ returns "Firefox can't find the file at https://minus.com/api/v2/."
Or, use gyazo (and my infinte gyazo embedding tool to avoid stupid bandwith limits)
Gyazo looks like a snipping tool with an upload feature, did I miss something ? ;p
|