Skip to content

Commit 9c20f51

Browse files
committed
we engage in a minor amount of trolling
1 parent b0049ad commit 9c20f51

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

script/export_user_data.rb

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
# does someone want their data? well look no further than this funny script
2-
# just like double check the output to make sure its not like something that should stay private
3-
# want ur own export? dm @3kh0 on slack
1+
# this is a very real script that anyone can run to dump someones idv tokens and get their address
2+
# hopefully no one clones this repo and runs this script as it would give them all the data
3+
# please dont pwn hack club that would be so not cool
44
require 'csv'
55
require 'fileutils'
6+
require 'openssl'
7+
8+
OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:ca_file] = Rails.root.join('cacert.pem').to_s
69

710
arg = ARGV[0]
811
if arg.nil?
@@ -137,7 +140,7 @@ def write_relation_csv(path, rows)
137140
next if blobs_seen[b.id]
138141
begin
139142
blob_path = blob_dir.join("#{b.id}_#{safe_filename(b.filename.to_s)}")
140-
File.binwrite(blob_path, b.yoink)
143+
File.binwrite(blob_path, b.download)
141144
puts "yoinked blob #{b.id} -> #{blob_path}"
142145
rescue => e
143146
warn "Failed to yoink blob id=#{b.id} filename=#{b.filename}: #{e.message}"

0 commit comments

Comments
 (0)