Discord Warning (Images aren't truly deleted).

Discussion in 'General Discussion' started by andrewkm, Feb 14, 2019.

  1. andrewkm

    Founder Premium Upgrade

    Joined:
    Apr 5, 2011
    Messages:
    20,370
    Trophy Points:
    102,160
    Ratings:
    +15,065
    Figured i'd make a general post for the ECC community in regards to a recent discovery made in relation to Discord.

    Any images you send, or that get sent to you, are not deleted when you or the user delete them from the conversation. Keep this in mind when sending / receiving images that you may have second thoughts about in the future.

    Steps are easy:
    1. Navigate to:
    drive:\Users\username\AppData\Roaming\discord\Cache

    2. Run Git Bash in this folder:
    Right click and select "Git Bash Here"

    3. Convert files to images by running the following command:
    Code:
    $ for x in *; do mv "$x" "${x%}.png"; done
    4. You should now see every image ever received, even if just for a second prior to it's deletion.

    Be cautious online boys and girls, once you send shit, it's out there forever.
     
    • Informative x 4
    • Like x 1
    • Winner x 1
    • Useful x 1
    • Potato x 1
    • List
    #1 andrewkm, Feb 14, 2019
    Last edited: Feb 14, 2019
  2. ajp79

    ajp79 President
    President ⛰️⛰️ Ex-Tycoon ⚜️⚜️⚜️ Prestige ⭐ I ⭐

    Joined:
    Mar 1, 2012
    Messages:
    1,404
    Trophy Points:
    39,160
    Gender:
    Male
    Ratings:
    +912
    Oh no!!

    I knew it was a bad idea to send you those pictures andrew.. but you persisted.. I feel so violated..

    :/
     
  3. 314

    314 Irratioπal President, former ServerAdmin
    President ⛰️⛰️ Ex-President ⚒️⚒️ Premium Upgrade

    Joined:
    Apr 1, 2014
    Messages:
    6,963
    Trophy Points:
    87,660
    EcoDollars:
    $27,000,000
    Ratings:
    +4,866
    Actually, using Windows's integrated CMD or PowerShell should work too.

    Shift + right click, then "Open Terminal/PowerShell here" (depending on the version).
    Code:
    ren *. *.png
    
    (Based on the Git-Bash script I'm going to assume that the images are stored without a file extension.)




    Addendum:
    I'm curious - why "${x%}.png"? Unless Git-Bash's syntax differs from Bash's, ${x%} shouldn't be any different than ${x} because % strips a given suffix and that suffix is... empty. And the resulting ${x} could be simplified to $x because it's followed by a period, which is not a valid variable identifier and thus there's no need to clear up any potential confusion using braces.
    Code:
    for x in *; do mv "$x" "$x.png"; done
    
    Sorry. Whenever I see a Bash script, I feel the urge to optimize it.
     
  4. andrewkm

    Founder Premium Upgrade

    Joined:
    Apr 5, 2011
    Messages:
    20,370
    Trophy Points:
    102,160
    Ratings:
    +15,065
    @314 I knew this thread would make you come out of the shadows ;)

    Command:
    Code:
    ren *. *.png
    has actually caused issues for some people. (Sorry don't have exact details).

    Regarding the git-bash command, your revision does indeed work and accomplishes the same goal :)
     
    #4 andrewkm, Feb 14, 2019
    Last edited: Feb 14, 2019
  5. 314

    314 Irratioπal President, former ServerAdmin
    President ⛰️⛰️ Ex-President ⚒️⚒️ Premium Upgrade

    Joined:
    Apr 1, 2014
    Messages:
    6,963
    Trophy Points:
    87,660
    EcoDollars:
    $27,000,000
    Ratings:
    +4,866
    I'm always lurking in the shadows - observing, waiting for the days my knowledge about programming languages or ECC bugs could be useful. :p

    Huh, that's interesting. The only reason I could imagine is that the folder may contain other files without an extension, but those would be renamed by the Git-Bash script, too. Strange.


    Also, it's interesting to note that the Bash command doesn't actually work in Linux (under ~/.config/discord/Cache). There's a source URL and a few unprintable characters prepended to the file, so those have to be stripped manually to make sure the magic value that identifies a PNG is located at the start of the file.
     
  6. Darth_Primus

    Darth_Primus Builder
    Builder ⛰️ Ex-Mayor ⚒️⚒️

    Joined:
    Feb 17, 2019
    Messages:
    12
    Trophy Points:
    3,665
    Gender:
    Male
    Ratings:
    +0
    Jamie Pine made a video about this, he also made a program to safely view the images. Look up his channel if you wanna know how he did it.

    The name of the program is CacheMonkey