[Passfault] Help with code

Cam Morris cam.morris at owasp.org
Mon Aug 29 20:03:48 UTC 2016


I created a new passfault project via gradle and I'm getting the same
problem.  I wonder if I broke TestAnalysis and didn't realize it.  I'm
working on a better answer for you.

On Mon, Aug 29, 2016 at 12:41 PM, Bernardo Araujo Rodrigues <
bernardo at posgrad.ufg.br> wrote:

> My project is named passfaultJava. Could that be an issue?
>
> Attached another screenshot.
> The only classpath that IntelliJ kind of accepts (and doesnt show the
> warning) is core_main.
>
> If I try to run it it core_main as classpath I get this error:
>
> /usr/lib/jvm/java-8-oracle/bin/java -Didea.launcher.port=7533
> -Didea.launcher.bin.path=/opt/idea-IC-162.1628.40/bin
> -Dfile.encoding=UTF-8 -classpath
> /usr/lib/jvm/java-8-oracle/jre/lib/charsets.jar:/usr/lib/
> jvm/java-8-oracle/jre/lib/deploy.jar:/usr/lib/jvm/java-
> 8-oracle/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/java-8-
> oracle/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-8-oracle/jre/
> lib/ext/jaccess.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/
> jfxrt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/localedata.
> jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/nashorn.
> jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunec.jar:/
> usr/lib/jvm/java-8-oracle/jre/lib/ext/sunjce_provider.jar:/
> usr/lib/jvm/java-8-oracle/jre/lib/ext/sunpkcs11.jar:/usr/
> lib/jvm/java-8-oracle/jre/lib/ext/zipfs.jar:/usr/lib/jvm/
> java-8-oracle/jre/lib/javaws.jar:/usr/lib/jvm/java-8-
> oracle/jre/lib/jce.jar:/usr/lib/jvm/java-8-oracle/jre/lib/
> jfr.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfxswt.jar:/
> usr/lib/jvm/java-8-oracle/jre/lib/jsse.jar:/usr/lib/jvm/
> java-8-oracle/jre/lib/management-agent.jar:/usr/lib/
> jvm/java-8-oracle/jre/lib/plugin.jar:/usr/lib/jvm/java-
> 8-oracle/jre/lib/resources.jar:/usr/li
>  b/jvm/java-8-oracle/jre/lib/rt.jar:/home/bernardo/
> Documents/MestradoCripto/passfault/passfaultJava/core/
> build/classes/main:/opt/idea-IC-162.1628.40/lib/idea_rt.jar
> com.intellij.rt.execution.application.AppMain
> org.owasp.passfault.TextAnalysis
> Exception in thread "main" java.io.IOException: could not load resource
> /org/owasp/passfault/wordlists/words.properties
>         at
> org.owasp.passfault.FinderByPropsBuilder$SystemResourceReader.
> loadResource(FinderByPropsBuilder.java:234)
>         at
> org.owasp.passfault.FinderByPropsBuilder.build(
> FinderByPropsBuilder.java:100)
>         at org.owasp.passfault.TextAnalysis.<init>(TextAnalysis.java:45)
>         at org.owasp.passfault.TextAnalysis.main(TextAnalysis.java:35)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 62)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:498)
>         at com.intellij.rt.execution.application.AppMain.main(
> AppMain.java:147)
>
> Process finished with exit code 1
>
>
>
> > I'm guessing it is the setting of "Use classpath of Module: " needs to be
> > changed from "wordlist_test" to "core".  Is the whole intellij project
> > named 'wordlist_test'?
> >
> > On Mon, Aug 29, 2016 at 11:23 AM, Bernardo Araujo Rodrigues <
> > bernardo at posgrad.ufg.br> wrote:
> >
> >> Hey Cam, could you please help me with something?
> >> My Java skills are a bit rusty.
> >> I'm trying to import the project into IntelliJ, so I can play with the
> >> code.
> >>
> >> I used IntelliJ's gradle import function (had a few problems but
> >> deleting
> >> appEngine and jsonService folders solved the issue).
> >>
> >> Now I'm doing the Run/Debug configs (see attached screenshot).
> >>
> >> - Set Main Class to org.owasp.passfault.TextAnalysis
> >> - Set classpath to wordlists (just like in /core/build/install/core/bin/
> >> core)
> >>
> >> The thing is IntelliJ warns me: "Class
> >> 'org.owasp.passfault.TextAnalysis'
> >> not found in module 'wordlists'.
> >>
> >> If I ignore the warning and try to Run the code, I get this:
> >>
> >> Exception in thread "main" java.lang.ClassNotFoundException:
> >> org.owasp.passfault.TextAnalysis
> >>         at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
> >>         at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> >>         at sun.misc.Launcher$AppClassLoader.loadClass(
> Launcher.java:331)
> >>         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> >>         at java.lang.Class.forName0(Native Method)
> >>         at java.lang.Class.forName(Class.java:264)
> >>         at com.intellij.rt.execution.application.AppMain.main(
> >> AppMain.java:123)
> >>
> >> Process finished with exit code 1
> >>
> >> _______________________________________________
> >> Passfault mailing list
> >> Passfault at lists.owasp.org
> >> https://lists.owasp.org/mailman/listinfo/passfault
> >>
> >>
> >
>
>
> --
>
> Webmail de Alunos - UFG
> _______________________________________________
> Passfault mailing list
> Passfault at lists.owasp.org
> https://lists.owasp.org/mailman/listinfo/passfault
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.owasp.org/pipermail/passfault/attachments/20160829/4087c770/attachment.html>


More information about the Passfault mailing list