Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 12 Mar 2016, 08:55
ka81's Avatar
ka81 ka81 is offline
 
Join Date: Mar 2006
Question How to identify a file to attachment id ?

Hello

Could someone tell me please is there any easy way to find a file by ID ?

for example I see link to attachment - /attachment.php?attachmentid=72697&d=1390755704
but the file name is /customattachments/9/4/7/2/8/67174.attach

So, how/where to get that info in most easy way (like some search field or a table or ...) ?

Thank you
__________________
OK
Reply With Quote
  #2  
Old 12 Mar 2016, 09:41
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
9/4/7/2/8 > 94728 in the path of the file on the server is the userid of the user.
72697 is the attachmentid in the attachment table.

You could query SELECT userid FROM attachment WHERE attachmentid = 72697 to get the userid.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.

Last edited by Dave; 12 Mar 2016 at 09:50.
Reply With Quote
  #3  
Old 12 Mar 2016, 09:48
ka81's Avatar
ka81 ka81 is offline
 
Join Date: Mar 2006
i dont need the user id. i can see who posted attachment. i need to know the name of real file if i know only like this - /attachment.php?attachmentid=72697
__________________
OK
Reply With Quote
  #4  
Old 12 Mar 2016, 09:52
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
It's stored in the same table as filedataid.
SELECT filedataid FROM attachment WHERE attachmentid = 72697

The filedataid should be the name of the .attach file.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #5  
Old 12 Mar 2016, 10:06
ka81's Avatar
ka81 ka81 is offline
 
Join Date: Mar 2006
I'm sorry, I just don't get it - what to do exactly?!..
could you please provide me with step-by-step instruction?
Thank yoy anyway!

--------------- Added 12 Mar 2016 at 10:07 ---------------

So, I see link /attachment.php?attachmentid=72697 in post.
I go to /admincp/queries.php?do=modify
what exactly should I do there?
__________________
OK
Reply With Quote
  #6  
Old 12 Mar 2016, 10:34
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
You execute the query I posted in my previous post. You will then see the filedataid which belongs to the attachment which you can then use to track the file on the server.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #7  
Old 12 Mar 2016, 10:48
ka81's Avatar
ka81 ka81 is offline
 
Join Date: Mar 2006

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

An error occurred while attempting to execute your query. The following information was returned.
error number: 1146
error desc: Table 'vb.attachment' doesn't exist
__________________
OK
Reply With Quote
  #8  
Old 12 Mar 2016, 10:58
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
Do you use a table prefix? (You can check that in the includes/config.php file). You have to prepend that prefix to "attachment".

So if your prefix is "ka81_" then you should change it to ka81_attachment.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #9  
Old 12 Mar 2016, 11:08
z3r0's Avatar
z3r0 z3r0 is offline
 
Join Date: Apr 2005
Location: Lancashire, UK
Whenever I need to find a file from ID I just put the number in to the vbulletin search and check the post it's in.
Reply With Quote
  #10  
Old 12 Mar 2016, 11:16
ka81's Avatar
ka81 ka81 is offline
 
Join Date: Mar 2006
Originally Posted by z3r0 View Post
Whenever I need to find a file from ID I just put the number in to the vbulletin search and check the post it's in.
I nkow post! I know even author!
I CAN NOT see what file was for that attachment!


it says - Invalid Attachment specified. If you followed a valid link, please notify the administrator
and that's all, no more any info!!!

--------------- Added 12 Mar 2016 at 11:20 ---------------

Dave
thank you very much!

but what if query don't give any result?
__________________
OK
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 12:39.

Layout Options | Width: Wide Color: