Menu

Command line

Help
2008-03-01
2013-04-16
  • Trevor Tanner

    Trevor Tanner - 2008-03-01

    Alright,

    I'm trying to essentially make a command line version of this program so that one simply swipes a card and the decoded ASCII information is kicked out.

    What I thought I could do was to create an instance of MicIn, modify decodeChars() in Swipe.java to print the "tempstripped" String, then run MicIn and kick back and relax while all the decoded information spit out to the console.

    Apparently, it ain't that easy.

    This is my pathetic attempt, any help or advice would be appreciated:

    ////////////////////////////////////////////////

    package magstripper;

    public class tester {
        private static MagstripperModel model;
       
        public static void main(String args[]){
            model = new MagstripperModel();
            MicIn inney = new MicIn(model);
            inney.setPriority(Thread.MAX_PRIORITY);
            inney.start();
        }

           
    }
    ////////////////////////////////////////////////

     
    • magstripper

      magstripper - 2008-03-02

      first problem is at the top of micin, change the true to false. initially it creates the micin object but doesnt automatically start reading input.

      private volatile boolean suspend = false;

      this is at least detecting audio and recording data mid swipe. i'm not sure if it's not ending the swipe due to my microphone just picking up random crap, or if there's something else going on. When you test first make sure your levels are correct by using the gui and making sure you can decode cards, you can check them in audacity also

      i dont have a mag reader on me but next week i can work on this a lot more and probably put a command line option in the next release. let me know how it goes and try to describe any problems you have as best you can.

       
    • Trevor Tanner

      Trevor Tanner - 2008-03-02

      Changed "suspend" to false as you suggested, but that didn't do the trick so I threw in this if statement:

      if(inney.getMic() == null){System.out.println("Still null");}

      and it of course has been giving me "Still null" messages, so I'm thinking the mic is probably having a problem initializing or something.

      The gui works just fine, once it boots up, I just start the mic listening without any configuration and it works smoothly, capturing and decoding data without any problems.  Perhaps I'm missing some hardware setup in Magstripper.java?

       
    • Trevor Tanner

      Trevor Tanner - 2008-03-09

      Have had some success in forcing the default application to start with the mic already listening and then have it output to the dos window, but start-up execution is a problem. Any thoughts on where the stripped down attempt is failing?

       
      • magstripper

        magstripper - 2008-03-09

        yeah i got a version working dumping out the raw binary and decoded ascii that starts up without a problem. i'm finishing up some touches to new features i added and i'll have an alpha version working out tonight.

        It's a pretty simple fix, i just added a cli.java that will be in the next alpha 0.3 release. I also uploaded a sequence diagram of how swipes are added, because it gets confusing following all those observers.

         
    • Trevor Tanner

      Trevor Tanner - 2008-03-15

      You are the man - just tried out the latest release and the command line works smoothly.  Can't thank ya enough for your help, will report back as I get the chance to test it out more thoroughly.  Thanks again.

       
    • piero camini

      piero camini - 2008-11-07

      Hi I have a problem, I hope you can help me.
      Yesterday I recorded a Pcm Wav files.
      But with the opening Magstripper not catch me.
      Do not mistake me, and as if he does not.
      The file is 832mb and inside there are audio tracks, but I can not read afrlo why?

      Thank you

       
      • magstripper

        magstripper - 2008-11-07

        I replied to your duplicate message in the other thread, also please make your own topic

         

Log in to post a comment.