Coder Social home page Coder Social logo

imapcrypt's Introduction

  • 👋 Hi, I’m @chrislee35
  • 👀 I’m interested in system's programming.
  • 🌱 I’m currently learning machine learning.
  • 💞️ I’m looking to collaborate on storytelling.
  • 📫 How to reach me ...

imapcrypt's People

Contributors

chrislee35 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

imapcrypt's Issues

Error when using command line

Whenever I try to run IMAPCrypt from the command line on Ubuntu I get the following error once I've entered all the credentials:

java.lang.ClassCastException: org.dhs.chrislee.DateBasedMessageEvaluationCallback cannot be cast to java.lang.Comparable
    at java.util.TreeMap.compare(TreeMap.java:1290)
    at java.util.TreeMap.put(TreeMap.java:538)
    at java.util.TreeSet.add(TreeSet.java:255)
    at org.dhs.chrislee.IMAPCrypt.addMessageEvaluationCallback(IMAPCrypt.java:175)
    at org.dhs.chrislee.IMAPCrypt.main(IMAPCrypt.java:569)

IMAPCrypt doesn't encrypt some mails containing attachments

Hi,

Thanks for this great tool, I managed to encrypt years of clear text emails. I got into trouble for some emails, they were not encrypted by IMAPCrypt. They were not corrupted, IMAPCrypt just skipped them. I got the following output:

2018-03-29 13:43:47 INFO  IMAPCrypt:316 - Message #31 on REDACTED REDACTED
2018-03-29 13:43:47 DEBUG IMAPCrypt:341 - Encrypting the MultiPartMime message
2018-03-29 13:43:47 ERROR IMAPCrypt:363 - The message failed to encrypt because of a IllegalWriteException: javax.mail.IllegalWriteException: IMAPBodyPart is read-only

It mainly affected messages with inline attachments, mails with .pdf or images attachments.

NullPointerException when email doesn't contain a proper date

When i try it from the commandline whit my Spamfolder its looks valid but after some time its stop whit a NullPointerException.

  • win7
  • java version "1.8.0_60"
  • Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
  • Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
...
2015-09-12 05:39:54 INFO  IMAPCrypt:327 -   Did not match all the filters
2015-09-12 05:39:55 INFO  IMAPCrypt:315 - Message #172 on Sat Sep 05 16:22:42 CEST 2015: VIDEO anschauen: Software verdi
ent f³r Sie 439 Euro pro Tag
2015-09-12 05:39:55 INFO  IMAPCrypt:327 -   Did not match all the filters
2015-09-12 05:39:55 INFO  IMAPCrypt:315 - Message #173 on Sat Sep 05 17:14:35 CEST 2015: Vom Bettler zum Multimillionõr
in 2 Jahren! VIDEO zum NACHMACHEN
2015-09-12 05:39:55 INFO  IMAPCrypt:327 -   Did not match all the filters
2015-09-12 05:39:56 INFO  IMAPCrypt:315 - Message #174 on null: Be young, have fun, taste Love
java.lang.NullPointerException
        at org.dhs.chrislee.DateBasedMessageEvaluationCallback.isEncryptableMessage(DateBasedMessageEvaluationCallback.java:60)
        at org.dhs.chrislee.IMAPCrypt.encrypt(IMAPCrypt.java:325)
        at org.dhs.chrislee.IMAPCrypt.main(IMAPCrypt.java:589)

If i try the gui at win7

C:\Users\root\Downloads>java -jar imapcrypt-2.0.2.jar
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at org.dhs.chrislee.imapgui.KeySelectorPanel.<init>(KeySelectorPanel.java:52)
        at org.dhs.chrislee.imapgui.KeySelectorPanel.<init>(KeySelectorPanel.java:38)
        at org.dhs.chrislee.imapgui.groups.RecipientPanel.<init>(RecipientPanel.java:36)
        at org.dhs.chrislee.imapgui.IMAPGui.<init>(IMAPGui.java:77)
        at org.dhs.chrislee.imapgui.IMAPGui$4.run(IMAPGui.java:326)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$500(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

GUI fails to launch when the secret key is unaccessible

In relation to issue #2, Hideio discovered a GUI launch bug when the secret keys are not found:
selectedKeyIds = new GPGKeyList();
for(GPGKeyId kid : secretKeyList.getKeyIDArray()) <-- crashes here
selectedKeyIds.addKeyId(kid);

I could hide the bug with some exceptions and default values, but I probably should present a warning dialog that no secret keys were found. The tool doesn't need secret keys to encrypt the email, but rather as a way of selecting the public keys that are most likely to be used. Furthermore, it decreases the chance that someone will encrypt to a key that they can't decrypt from.

So, a "fix" would be easy, but the proper interface will take time to think through... I think I'll patch around the issue for a patch-version, and then add the proper interface for a point-version later.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.