AutID Posted November 11, 2013 Share Posted November 11, 2013 (edited) Hello,Does anyone knows any file upload UDFs or API??? I am searching for a file upload api without requireing an account.Not large files. Just some small txt files arround 50-100 kb...I found some UDF on examples forum but they all require account.Any kind of help is appreciated.CheersEdit: Btw because i found a lot of posts with IE automation, of course it is not what i am looking for. Edited November 11, 2013 by AutID https://iblockify.wordpress.com/ Link to comment Share on other sites More sharing options...
l3ill Posted November 11, 2013 Share Posted November 11, 2013 Hi AutoID Where would you like to upload files to, if you don't have (an account) password access? I don't know of anywhere that you can do this w/out login credentials. Bill My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
mrflibblehat Posted November 11, 2013 Share Posted November 11, 2013 (edited) If they are only 50 - 100k text files, you could try pastebin, Check out my signature. Just set the publicity to private. #include <File.au3> #include <Pastebin.au3> ;~ Directory with text files in ~; $vDir = "C:\textfiles" ;~ Read File List to Array ~; $vFileArr = _FileListToArray($vDir) ;~ Open Pastebin WinHTTP ~; _PB_Open() ;~ Loop Through Files and Post Them To Pastebin ~; For $i = 1 to $vFileArr[0] $vFileRead = FileRead($vDir & "\" & $vFileArr[$i]) $vPaste = _CreatePaste($vFileRead, $vFileArr[$i], "text", 0) ConsoleWrite($vFileArr[$i] & " - " & $vPaste & @CRLF) Next ;~ Close Pastebin WinHTTP ~; _PB_Close() Edited November 12, 2013 by mrflibblehat [font="'courier new', courier, monospace;"]Pastebin UDF | Prowl UDF[/font] Link to comment Share on other sites More sharing options...
guinness Posted November 11, 2013 Share Posted November 11, 2013 You could also look at using ge.tt's API, pretty simple to implement using the WinHTTP UDF. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Danyfirex Posted November 11, 2013 Share Posted November 11, 2013 traslate this snippet. it's very easy. It's coded in vb6. ' =================================================================' =================================================================' => Autor: Danyfirex' => Upload file to AnonFiles.com' => Gracias AnonFiles.com' => Fecha : 14|05|2013' => Uso: AnonFilesUpload("c:hola.rar")' => Retorno: Texto de Respuesta (hotlink)' =================================================================' =================================================================Option ExplicitFunction AnonFilesUpload(filepath As String) As StringDim boundary As StringDim Post As StringDim bytesfinal() As ByteDim bytes() As ByteDim url As StringDim Http As ObjectDim filedata As Stringurl = "https://anonfiles.com/api/hotlink"boundary = "--------Boundary"Open filepath For Binary As #1ReDim bytes(LOF(1) - 1)Get #1, , bytes()Close #1filedata = StrConv(bytes(), vbUnicode)Post = "--" & boundary & vbCrLf & _"Content-Disposition: form-data; name=" & Chr(34) & "file" & Chr(34) & "; filename=" & Chr(34) & filename(filepath) & Chr(34) & vbCrLf & _"Content-Type: application/octet-stream" & vbCrLf & vbCrLf & _filedata & vbCrLf & _"--" & boundary & "--" & vbCrLfbytesfinal() = StrConv(Post, vbFromUnicode)Set Http = CreateObject("winhttp.winhttprequest.5.1")Http.Open "POST", url, FalseHttp.SetRequestHeader "Content-Type", "multipart/form-data; " & "boundary=" & boundaryHttp.Send (bytesfinal())AnonFilesUpload = Http.ResponseTextSet Http = NothingEnd FunctionFunction filename(cadena As String) As StringDim cadenas() As Stringcadenas() = Split(cadena, "")filename = cadenas(UBound(cadenas))End Function Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
guinness Posted November 11, 2013 Share Posted November 11, 2013 Oh that's a new site I haven't heard of. Probably best to post that in a code box if I were you. Danyfirex 1 UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
AutID Posted November 12, 2013 Author Share Posted November 12, 2013 (edited) If they are only 50 - 100k text files, you could try pastebin, Check out my signature. Just set the publicity to private. I will take a lookEdit: i took ur function You could also look at using ge.tt's API, pretty simple to implement using the WinHTTP UDF.I used to know that site but i had forgot about it The only problem is that looking at the Rest api of the ge.tt it requires an account to be able to use the api. From what i am understanding traslate this snippet. it's very easy. It's coded in vb6. ' =================================================================' =================================================================' => Autor: Danyfirex' => Upload file to AnonFiles.com' => Gracias AnonFiles.com' => Fecha : 14|05|2013' => Uso: AnonFilesUpload("c:hola.rar")' => Retorno: Texto de Respuesta (hotlink)' =================================================================' =================================================================Option ExplicitFunction AnonFilesUpload(filepath As String) As StringDim boundary As StringDim Post As StringDim bytesfinal() As ByteDim bytes() As ByteDim url As StringDim Http As ObjectDim filedata As Stringurl = "https://anonfiles.com/api/hotlink"boundary = "--------Boundary"Open filepath For Binary As #1ReDim bytes(LOF(1) - 1)Get #1, , bytes()Close #1filedata = StrConv(bytes(), vbUnicode)Post = "--" & boundary & vbCrLf & _"Content-Disposition: form-data; name=" & Chr(34) & "file" & Chr(34) & "; filename=" & Chr(34) & filename(filepath) & Chr(34) & vbCrLf & _"Content-Type: application/octet-stream" & vbCrLf & vbCrLf & _filedata & vbCrLf & _"--" & boundary & "--" & vbCrLfbytesfinal() = StrConv(Post, vbFromUnicode)Set Http = CreateObject("winhttp.winhttprequest.5.1")Http.Open "POST", url, FalseHttp.SetRequestHeader "Content-Type", "multipart/form-data; " & "boundary=" & boundaryHttp.Send (bytesfinal())AnonFilesUpload = Http.ResponseTextSet Http = NothingEnd FunctionFunction filename(cadena As String) As StringDim cadenas() As Stringcadenas() = Split(cadena, "")filename = cadenas(UBound(cadenas))End FunctionI will give that a goEdit: that site is dead. Or it doesnt work properly. It doesnt give me an url from files uploaded Edited November 12, 2013 by AutID https://iblockify.wordpress.com/ Link to comment Share on other sites More sharing options...
Danyfirex Posted November 12, 2013 Share Posted November 12, 2013 (edited) For me is working correctly. try again. saludos edit: Look the ported example: Func AnonFilesUpload($Filepath) Local $sServerURL="https://anonfiles.com/api/hotlink" Local $boundary = "--------Boundary" Local $Postdata = "--" & $boundary & @crlf & _ "Content-Disposition: form-data; name=" & Chr(34) & "file" & Chr(34) & "; filename=" & Chr(34) & filename($filepath) & Chr(34) & @crlf & _ "Content-Type: application/octet-stream" & @crlf & @crlf & _ Fileread("1.txt") & @crlf & _ "--" & $boundary & "--" & @crlf Local $oHTTP = ObjCreate('winhttp.winhttprequest.5.1') $oHTTP.Open("POST", $sServerURL, false) $oHTTP.SetRequestHeader("Content-Type", "multipart/form-data; " & "boundary=" & $boundary) $oHTTP.Send($Postdata) $oHTTP.WaitForResponse() $hotlink=$oHTTP.ResponseText $hotlink=StringRegExpReplace(stringmid($hotlink,StringInStr($hotlink,"https")),'[/"}]',"") Return $hotlink EndFunc Func filename($filepath) Local $file=StringSplit($filepath,"\") Return $file[(ubound($file)-1)] EndFunc saludos Edited November 12, 2013 by Danyfirex mLipok 1 Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
AutID Posted November 13, 2013 Author Share Posted November 13, 2013 It doesn't work. Check your consolewrite output. It will always return the same link no matter what. That site is dead in my opinion. Or turned into an adds site.Local $filepath = @DesktopDir & "\chat.txt" $output = AnonFilesUpload($filepath) ConsoleWrite(filename($filepath) & @CRLF) ConsoleWrite($output & @CRLF) Func AnonFilesUpload($filepath) Local $sServerURL = "https://anonfiles.com/api/hotlink" Local $boundary = "--------Boundary" Local $Postdata = "--" & $boundary & @CRLF & _ "Content-Disposition: form-data; name=" & '"' & "file" & '"' & "; filename=" & '"' & filename($filepath) & '"' & @CRLF & _ "Content-Type: application/octet-stream" & @CRLF & @CRLF & _ FileRead($filepath) & @CRLF & _ "--" & $boundary & "--" & @CRLF Local $oHTTP = ObjCreate('winhttp.winhttprequest.5.1') $oHTTP.Open("POST", $sServerURL, False) $oHTTP.SetRequestHeader("Content-Type", "multipart/form-data; " & "boundary=" & $boundary) $oHTTP.Send($Postdata) $oHTTP.WaitForResponse() $hotlink = $oHTTP.ResponseText $hotlink = StringRegExpReplace(StringMid($hotlink, StringInStr($hotlink, "https")), '[/"}]', "") Return $hotlink EndFunc Func filename($filepath) Local $file = StringSplit($filepath, "\") Return $file[(UBound($file) - 1)] EndFunc https://iblockify.wordpress.com/ Link to comment Share on other sites More sharing options...
Danyfirex Posted November 13, 2013 Share Posted November 13, 2013 You're uploading the same file. use a diferent file. Not same MD5 or hash. saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
AutID Posted November 14, 2013 Author Share Posted November 14, 2013 I am not uploading the same file. It is just an example. Whatever i upload it will return the same link. And the link isnt for the file. It's a link of the site... https://iblockify.wordpress.com/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now