Stealing Storage from Discord

Dev Detour
17 Nov 202307:39

Summary

TLDRこのビデオでは、無料で大きな容量のファイルを保存する方法が紹介されています。Google Driveの無料ストレージが不足し、有料アップグレードを勧められた際に、ソフトウェア工学の知識を駆使してDiscordを活用してファイルを保存する方法を提案します。YouTubeはビデオのアップロードに適しているものの、圧縮によるデータ損失が懸念されるため、Discordの25MBのファイルサイズ制限を利用して、ファイルを小さなチャンクに分割してアップロードする手法を開発しました。プライバシーを確保するために、チャンクを暗号化し、Discordサーバー上でのみアクセス可能な方法でデータを保管しています。実際にデータをアップロードし、ダウンロードするプロセスも解説されており、データの整合性と持続可能性についても触れられています。

Takeaways

  • 🔑 作者在上传文件到Google Drive时注意到了免费存储空间即将用完的警告横幅。
  • 💼 Google Drive的付费存储计划相对便宜,但作者选择了不花钱的方案。
  • 🛠️ 作者利用软件工程知识,通过牺牲时间和理智,避免了大约50美元的支出。
  • 🎵 作者通过将文件存储在Discord上,实现了免费存储数百GB的文件。
  • 📚 作者提到了iCloud和Google Drive等云存储服务的免费限制,并考虑了免费获取大量存储空间的可能性。
  • 📈 作者认为社交媒体平台本质上是上传文件并与他人分享的地方,可以利用这一点来获取免费存储。
  • 📹 作者首先考虑使用YouTube作为存储平台,但由于转换、上传和压缩的问题,最终放弃了这个想法。
  • 🗣️ 作者选择了Discord作为存储平台,尽管有25MB的文件大小限制。
  • 🔒 作者通过创建只有机器人和自己在内的Discord服务器来保持文件的私密性。
  • 🔒 作者还通过加密每个文件块来进一步保护隐私,即使有人能够访问Discord上的附件,也无法阅读数据。
  • 📈 作者通过编写前端和后端程序,实现了文件的上传和下载,尽管这个过程比较慢。
  • 📊 作者进行了速度测试,发现上传55GB的文件需要2.5小时,下载速度稍快。
  • 📅 经过几个月的测试,作者确认上传的文件没有过期,仍然可以下载和解码。
  • ⚠️ Discord宣布将改变外部CDN链接的工作方式,作者计划在变更后进行跟进,以检查其存储方法是否仍然有效。

Q & A

  • Google Driveの無料ストレージ容量に近づいたらどのような警告が表示されると説明されていますか?

    -Google Driveの無料ストレージ容量に近づくと、上部に小さなバナーが表示され、追加のストレージを購入するよう促す警告が表示されると説明されています。

  • ストレージの価格は現在どのような状況にあると話されていますか?

    -ストレージの価格は現在歴史的低水準にあると話されています。

  • なぜ話者はGoogle Driveのストレージ容量を購入するのを避けたいと考えていますか?

    -話者はソフトウェア工学の知識を使って時間をかけてお金を使わずにデータを保存したいと考えています。

  • 話者はなぜDiscordを使ってデータを無料で保存しようと思ったのですか?

    -Discordは無料でファイルをアップロードできるサービスであり、各ファイルは25メガバイトまでの制限がありますが、大きなファイルを25メガバイトのチャンクに分割してアップロードできると話されています。

  • YouTubeをストレージとして使用するアイデアはなぜ却下されましたか?

    -YouTubeはビデオファイルのみをサポートし、変換、アップロード、ダウンロードが遅いという欠点があり、また圧縮によってデータが失われる可能性があるため却下されました。

  • Discordでファイルをアップロードする際のファイルサイズの制限は何バイトですか?

    -Discordでファイルをアップロードする際のファイルサイズの制限は25メガバイトです。

  • 話者はDiscordアプリケーションを作成し、どのような機能を実装しましたか?

    -話者はDiscordアプリケーションを作成し、ファイルを25メガバイトのチャンクに分割し、各チャンクをDiscordサーバーにアップロードする機能を実装しました。

  • アップロードされたファイルがDiscord上で公開される可能性があるため、話者はどのようにプライバシーを確保しようとしていますか?

    -話者はファイルをチャンクに分割して暗号化し、ダウンロード時に復号化することでプライバシーを確保しようとしています。

  • 話者はDiscordにデータをアップロードするプロセスはどのくらいの時間がかかりましたか?

    -アップロードは時間がかかり、特に大きなファイルでは数時間かかることがあると話されています。

  • アップロードとダウンロードの速度はどのくらいでしたか?

    -アップロードは約2分45秒/ギガバイト、ダウンロードは約1分40秒/ギガバイトと評価されています。

  • Discordが外部CDNリンクの動作を変更する予定があることについて話者はどのように対応する予定ですか?

    -話者は変更が行われた後にフォローアップビデオを計画しており、その変更が現在の方法に影響を与えるかどうかを確認する予定です。

Outlines

00:00

😀 Google DriveとDiscordを使った無料でストレージを確保する

ビデオでは、Google Driveの無料ストレージが不足し、アップグレードを促すバナーに遭遇したことから、無料でストレージを確保する方法を探求します。YouTubeはビデオを無料でアップロードできるが、コンバージョンとアップロードが遅く、圧縮によりデータが失われる可能性があるという欠点がありました。しかし、Discordは25MBまでのファイルを無料でアップロードでき、チャンネルを作成してボットとのみで管理することでプライバシーを確保することができます。

05:00

🔒 Discordを利用してファイルを安全にアップロードする

Discordを利用してファイルをアップロードする際には、プライバシーの問題が懸念されますが、チャンネルID、メッセージID、添付ファイル名を知る必要があるため、安全です。しかし、より安全に保つために、ファイルをチャンクに分割して暗号化し、Discordにアップロードします。ダウンロード時には、各チャンクを復号化して元のファイルに戻します。この方法で、Discord上でデータを安全に保管し、アップロードとダウンロードの速度も測定されていますが、遅いと感じるかもしれません。Discordは外部CDNリンクを変更する予定で、外部からのリンクは24時間後に失効するという変更もありますが、Discord内からのリンクは機能し続けます。

Mindmap

Keywords

💡Google Drive

Google DriveはGoogleによって提供されるクラウドストレージサービスです。ビデオでは、無料で提供されるストレージの上限に近づいていたと警告されたと述べています。このサービスはビデオのテーマに関連して、無料で提供されるストレージの限界に直面し、他の方法でデータを保存する必要があると感じた際の代替手段として提唱されています。

💡ストレージプラン

ストレージプランとは、データを保存するための容量を購入するオプションのことです。ビデオでは、ストレージプランが歴史的低価格であると述べており、大容量のストレージを手ごろな価格で購入できると紹介していますが、無料でストレージを獲得する方法を探求しています。

💡ソフトウェアエンジニアリング

ソフトウェアエンジニアリングは、ソフトウェアの設計、開発、テスト、および保守に関する専門的な分野です。ビデオでは、ソフトウェアエンジニアとしての知識を活用して無料でストレージを確保する方法を模索していると述べています。これは、ビデオの中心的なトピックである無料でストレージを獲得する方法に関連しています。

💡Discord

Discordは、主にゲームプレイヤーが使用するコミュニケーションプラットフォームですが、ビデオではファイルのアップロードに使用されると提唱されています。ビデオではDiscordを使って数百ギガバイトのファイルを無料で保存する方法を説明しており、これはビデオの主要なメッセージに関連しています。

💡ファイルのチャンキング

チャンキングは、大きなファイルを小さなチャンクに分割するプロセスです。ビデオでは、Discordの25メガバイトのファイルアップロード制限に対処するために、ファイルを25メガバイトのチャンクに分割してアップロードする手法を使用しています。これは、ビデオの中心的な解決策の一つであり、無料でストレージを獲得する方法に不可欠です。

💡エンコードとデコード

エンコードはデータを特定の形式に変換し、デコードはその逆のプロセスです。ビデオでは、ファイルをチャンクに分割し、それぞれのチャンクを暗号化することでプライバシーを保護する手法を説明しています。エンコードとデコードは、ビデオのテーマにおけるデータ保護に関連しています。

💡暗号化

暗号化は、データを保護するために使用されるセキュリティ技術です。ビデオでは、Discordにアップロードする際にファイルを暗号化することで、他人がファイルを読むことがないようにしています。これは、ビデオのプライバシーとデータ保護の重要な側面に関連しています。

💡アップロードとダウンロード

アップロードはデータをサーバーに送信し、ダウンロードはデータを受信することを指します。ビデオでは、Discordにファイルをアップロードし、必要に応じてダウンロードするプロセスについて説明しています。これは、ビデオの中心的なプロセスであり、無料でストレージを獲得する方法に直接関係しています。

💡データの整合性

データの整合性とは、データが正確で変更されていないことを保証するものです。ビデオでは、アップロードとダウンロードのプロセスが完了した後も、データが変更されていないことを確認しています。これは、ビデオの信頼性とデータ保護の重要な側面に関連しています。

💡Discord API

Discord APIは、Discordサービスと通信し、データを操作するためのプログラム可能なインターフェースです。ビデオでは、Discord APIを使用してファイルをダウンロードし、チャンクを再構成するプロセスについて説明しています。これは、ビデオの技術的な側面に関連しており、無料でストレージを獲得する方法に不可欠です。

Highlights

The user uploaded files to Google Drive and noticed a banner warning about approaching free data limits.

Google Drive's storage plans are not too expensive, but the user prefers a $0 solution.

The user considered using software engineering to avoid spending money on storage.

The idea of getting a lot of free storage by exploiting social media platforms was proposed.

YouTube was initially considered for its ability to upload large video files for free.

FFMpeg was suggested as a tool to convert various file types to video for YouTube storage.

Drawbacks of using YouTube include slow conversion, upload times, and potential data corruption due to compression.

Discord was identified as a superior alternative for free storage due to its file upload feature.

Discord has a 25-megabyte limit per file, but files can be split into smaller chunks.

The user created a Discord application and server to handle file uploads and downloads.

A React front end was developed for a simple file upload interface.

Files are split into 25-megabyte chunks, encrypted, and uploaded as Discord message attachments.

Discord's public nature raises privacy concerns, so the user suggests creating a private server.

Encrypting file chunks ensures privacy even if someone gains access to the Discord server.

The process of uploading files to Discord is time-consuming but feasible.

Performance tests show slow upload and download speeds, but acceptable for infrequent access.

Discord's recent policy changes regarding external CDN links may affect the storage method.

The user plans to make a follow-up video to address potential impacts of Discord's policy changes.

Transcripts

play00:00

the other day I was uploading some files

play00:02

to my Google Drive like I do sometimes

play00:04

and I noticed this little Banner at the

play00:05

top warning me that I was getting close

play00:06

to my free data allocation and

play00:08

encouraging me to give Google just a

play00:09

little bit of money for some more

play00:10

storage looking at their plans these are

play00:13

actually not too terribly expensive and

play00:15

storage prices are currently at historic

play00:16

low so I could even buy myself a terab

play00:18

or so for a pretty reasonable price but

play00:21

you know what's an even more reasonable

play00:22

price $0 so using a bit of software

play00:25

engineering knowhow I wisely traded tens

play00:27

of hours of my life and much of the

play00:29

sanity I had left to avoid spending

play00:31

probably $50 here's how I managed to

play00:33

store hundreds of gigabytes of my files

play00:35

on Discord for

play00:36

[Music]

play00:38

free if you're like me you have a lot of

play00:41

files and you're probably getting pretty

play00:42

close to the free limits for iCloud or

play00:44

Google drive if you're not already

play00:45

paying for extra storage but I've been

play00:48

thinking if you can get a little bit of

play00:50

storage for free why can't you get a lot

play00:52

of free storage if you think about it

play00:54

every social media platform is really

play00:56

just a place where you can upload your

play00:57

files or content if you prefer and have

play01:00

other people look at them right Facebook

play01:02

YouTube Instagram they're all the same

play01:03

you upload your files and share them

play01:05

with people the key part to keep in mind

play01:07

here is that mostly these companies

play01:09

might set limits on file sizes or

play01:11

quantities per post but they usually

play01:13

don't limit the amount of data a single

play01:14

user or account can upload and we can

play01:16

absolutely abuse this feature to get as

play01:18

much storage as we want for

play01:20

free my first candidate for a platform

play01:22

to steal storage from was YouTube

play01:25

YouTube lets you upload videos for free

play01:26

and each one can be 256 GB or 12 hours

play01:29

long

play01:30

whichever comes first so this seemed

play01:32

like a solid way of getting lots of 256

play01:34

GB size trunks of storage obviously this

play01:37

would only work for video files so I

play01:38

need some way of converting all my data

play01:40

like word docs text files images Etc to

play01:43

video fortunately somebody smarter than

play01:45

me has already figured out a way to do

play01:47

this with FFM Peg and posted the script

play01:49

for it on

play01:49

GitHub storing files on YouTube with

play01:52

this script would probably work but

play01:54

there were a few drawbacks some issues

play01:55

are that it's slow to convert to and

play01:57

from video it's also pretty slow to

play02:00

upload a video wait for YouTube to

play02:02

process it and then download it later

play02:04

the video file size ends up being

play02:06

several times the size of the original

play02:07

file but the big issue would probably be

play02:09

compression YouTube processes and

play02:11

compresses its videos to save storage

play02:13

which is great for them but potentially

play02:15

bad for being able to read my data later

play02:18

compression could lead to losing some

play02:19

information and ultimately corrupt my

play02:21

files all of these problems were

play02:23

probably solvable it would just make

play02:25

things slow but speed's not a huge

play02:27

concern for me anyway because I mostly

play02:28

just want to store a bunch of files I

play02:30

don't access frequently but I decided

play02:32

pretty early on to give up on the

play02:34

YouTube route because I realized there's

play02:35

a much better solution there's another

play02:37

service that lets you upload files for

play02:39

free it's called Discord you may have

play02:41

heard of it sure most people use

play02:43

discord's text chat and voice chat

play02:44

features to do boring things like play

play02:46

games with friends but you can also

play02:48

upload files to Discord as message

play02:50

attachments unfortunately there's a 25

play02:52

megabyte limit but fun fact one big file

play02:55

is really just a bunch of small files

play02:57

all put together in a row so all I need

play02:59

to do is split up my files larger than

play03:01

25 megab into 25 megab chunks so that I

play03:03

can upload them and even though there

play03:05

are different types of files like text

play03:07

photos videos with all sorts of file

play03:09

formats when it comes down to it it's

play03:10

all just data as long as I have all the

play03:13

original bits of data in the right order

play03:14

and I know what the original name of the

play03:16

file was I can chop up any file into

play03:18

tiny bits store them in Discord then

play03:20

download them and reassemble the

play03:21

original file

play03:23

later so I got to work I created a

play03:26

Discord application in the developer

play03:28

portal and wrote a server in noj as to

play03:30

handle uploading and downloading files

play03:31

from Discord I wrote a very basic front

play03:34

end in react to give me a simple way of

play03:35

interacting with the server when I want

play03:38

to upload a file I can go to the front

play03:39

end website and hit upload like you

play03:41

would on any regular website that

play03:42

accepts file uploads the files then

play03:44

transferred to my backend server which

play03:46

splits it up into 25 megabyte chunks

play03:48

then uploads each chunk as a message

play03:50

attachment in a Discord server the bot

play03:51

has joined when the bot sends a file

play03:54

attached to a message to Discord Discord

play03:56

publishes that message to the channel

play03:57

and replies to the bot with a unique ID

play03:59

of that message the bot keeps track of

play04:01

the message IDs of each chunk and stores

play04:03

them in a database with some extra

play04:04

information about the file like the

play04:06

original name size and format later when

play04:09

I want to download a file I can send the

play04:10

server the name of the file I want to

play04:12

download the server can then use the

play04:14

file name to look up which chunks are

play04:16

associated with that file get the

play04:18

message IDs of those chunks and use the

play04:19

Discord API to download all those

play04:21

attachments then it can put them all in

play04:23

the right order and write each chunk one

play04:25

after another back to disk with the

play04:26

original file name in this way we can

play04:29

upload an download files of arbitrary

play04:30

size by breaking them into small 25

play04:32

megab

play04:43

chunks but there's still a pretty big

play04:45

problem here privacy Discord is of

play04:48

course public so anyone on the server

play04:50

can see the messages and attachments

play04:51

that the bot sends the easiest way to

play04:54

keep my files private would be to just

play04:55

create a Discord server where the bot

play04:57

and I are the only members and that way

play04:59

no one else would be able to read my

play05:00

data this would probably work although

play05:03

anybody can download an attachment from

play05:05

Discord CDN you would need to know the

play05:07

exact Channel ID message ID and even

play05:09

attachment name associated with an

play05:11

attachment in order to properly download

play05:12

it which I think is pretty unlikely for

play05:14

anyone to guess on their own but it

play05:16

doesn't hurt to be extra safe even if

play05:19

nobody's in my server right now it's

play05:21

possible hypothetically for instance

play05:22

that the IRS could join later this year

play05:24

when tax season comes around and they'd

play05:26

be able to see all my sensitive tax

play05:28

documents with my plans to commit tax

play05:29

Rod I of course do not want this so it

play05:32

would be good to conceal my data

play05:34

fortunately I can do that pretty quickly

play05:36

each chunk of file I encode will be

play05:37

encrypted then when I read the file back

play05:39

I can decrypt each chunk before putting

play05:41

it back together now nobody can see what

play05:44

the data I'm writing actually is if they

play05:46

look at the message attachments all

play05:47

they'll see is a bunch of random symbols

play05:49

and

play05:50

characters now that I had it all coded

play05:52

up the last thing left to do was to just

play05:53

upload all my data this is not

play05:56

particularly fast first I have to upload

play05:59

the file through my browser to the

play06:00

backend server which takes some time

play06:03

next the server has to read the whole

play06:05

file break it into Trunks and encrypt it

play06:07

which also takes time then it has to

play06:08

upload all the trunks to Discord which

play06:10

takes even more time I added a status

play06:13

bar so I'd be able to tell if anything

play06:14

was actually happening because uploads

play06:16

and downloads can take several hours but

play06:19

ultimately I did get all my files

play06:20

uploaded without too much

play06:22

effort now let's talk about performance

play06:25

if I had to describe it in one word it

play06:26

would be eh I did a speed test and for a

play06:30

55 GB file it took me 2 and 1/2 hours to

play06:33

upload that's about 2 minutes and 45

play06:35

seconds per gigabyte which is definitely

play06:37

slow but not actually too bad I guess

play06:40

downloads are a little bit faster we're

play06:43

looking at about a minute and 40 seconds

play06:44

per gigabyte to download which again is

play06:47

pretty okay and probably much faster

play06:49

than this deeply cursed project really

play06:51

deserves in terms of data integrity and

play06:53

Longevity so far everything seems good

play06:55

it doesn't seem like any of my data has

play06:57

expired it's taken me a couple months to

play06:59

get this all done and in that time the

play07:01

first file I uploaded for testing still

play07:03

downloads and decodes without

play07:09

issue quick note here it's a few months

play07:12

later as I'm editing this and Discord

play07:14

just announced that they're going to

play07:15

change how external CDN links work

play07:17

because believe it or not people have

play07:18

been hosting malware on Discord now CDN

play07:21

links from outside of Discord will break

play07:23

after 24 hours but links within Discord

play07:25

will still function I'm planning a

play07:27

follow-up video after they make this

play07:28

change because it's possible it'll break

play07:30

what I'm doing here but I actually think

play07:31

it might not so keep an eye out for that

play07:33

in the near future so that's how I'm

play07:35

storing all my files on Discord thanks

play07:37

for watching

Rate This

5.0 / 5 (0 votes)

Related Tags
クラウドストレージDiscord無料データ保存ファイルアップロードセキュリティプライバシーデータ圧縮ウェブサービステクノロジー活用
Do you need a summary in English?