somenonymous / OshiUpload

Ephemeral file sharing engine
Do What The F*ck You Want To Public License
164 stars 23 forks source link

Files deleted after 1h #14

Open zell180 opened 1 year ago

zell180 commented 1 year ago

Hi, I know that the topic is not directly related to the project but it is the only contact channel I have found. Why are my files deleted even though I entered the expire = 7200 parameter in the POST request?

This is my Python code files = {'file': (os.path.basename(path), open(path, 'rb'), 'application/zip')} parameters = { "expire": 7200, "shorturl": 0 } r = requests.post('https://oshi.at', files=files, params=parameters

somenonymous commented 1 year ago

Does this happen on your your self-hosted instance or oshi.at ?

zell180 commented 1 year ago

On oshi.at

somenonymous commented 1 year ago

We currently run an external script hourly that lists archives containing executable files and automatically delete them. Since you have mentioned your files are being removed after an hour then they're probably caught by this script. We do this due to a recent malware influx that was happening on our domain that made our domain flagged by every possible blacklist provider, thus this measure had to be introduced. The following extensions trigger automatic removal: exe,apk,dll

zell180 commented 1 year ago

Yes i confirm inside there is an exe file. Is an rpgmaker game. There is no way to sign this file as trusted?

somenonymous commented 1 year ago

Making such exceptions will presumably open possibilities to circumvent our measures by impersonating one of the whitelisted files. Our script also doesn't extract them from the archive, thus hashsum whitelisting isn't an option here either, because it only lists archive filenames.

You still have various options to avoid it:

  1. Encrypt filenames in the archive using 7-zip -mhe flags, so our script will just skip it: 7z -p -mhe a archive.7z [files]

  2. Use an archive type that isn't one of these: rar, zip, unencrypted 7z

zell180 commented 1 year ago

Thank you. Probably i can do without It

zell180 commented 1 year ago

I've deleted exe file but .zip file continue to be deleted. Other type of file that i need to check?

somenonymous commented 1 year ago

Yeah, I've just opened a script log and your dll also get triggered:

game/rpg_rt.exe [ boMy_patch.145.rpgilmito.zip ]
Files deleted: 1
game/rpg_rt.exe [ iabu_patch.145.rpgilmito.zip ]
Files deleted: 1
game/rpg_rt.exe [ mBdR_patch.145.rpgilmito.zip ]
Files deleted: 1
game/rpg_rt.exe [ Nncd_patch.145.rpgilmito.zip ]
Files deleted: 1
game/rpg_rt.exe [ Xzbw_patch.145.rpgilmito.zip ]
Files deleted: 1
game/rpg_rt.exe [ nxHu_patch.145.rpgilmito.zip ]
Files deleted: 1
game/rpg_rt.exe [ nght_patch.145.rpgilmito.zip ]
Files deleted: 1
game/rpg_rt.exe [ hogT_patch.145.rpgilmito.zip ]
game/ultimate_rt_eb.dll [ wNNU_patch.145.rpgilmito.zip ]
game/rpg_rt.exe [ kHjQ_patch.145.rpgilmito.zip ]
Files deleted: 3
game/ultimate_rt_eb.dll [ CFGj_patch.145.rpgilmito.zip ]
Files deleted: 1
pol/ImportXSL.dll [ GjHi_Pro_Swapper.rar ]
game/ultimate_rt_eb.dll [ WRDR_patch.145.rpgilmito.zip ]
Files deleted: 2

The following extensions trigger automatic removal: exe,apk,dll

zell180 commented 1 year ago

Damn.. so dll and exe with zip file is not compatible.. absolutely no way to accomplish this task?

somenonymous commented 1 year ago

There is a way:

You still have various options to avoid it:

  • Encrypt filenames in the archive using 7-zip -mhe flags, so our script will just skip it: 7z -p -mhe a archive.7z [files]
  • Use an archive type that isn't one of these: rar, zip, unencrypted 7z

Or just use a .tar archive.