Thread: popen and /bin/bash -c

  1. #16
    Registered User
    Join Date
    Apr 2010
    Posts
    43
    yes, it use ioctl at the source of airodump :/ but i can't change it from there because i need to use the airodump as it comes with aircrack-ng :/ any other idea?

  2. #17
    Registered User
    Join Date
    Apr 2010
    Posts
    43
    Quote Originally Posted by nonpuz View Post
    Did you try calling airodump directly instead of calling it through bash? What is the reason for this by the way?

    Also, so I'm assuming this is for wireless cracking ?
    yes, nothing changed. i just make a gui for it

  3. #18
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by nonpuz View Post
    Did you try calling airodump directly instead of calling it through bash?
    You might want to read more than one post in the thread, nonpuz, just so everyone does not have to repeat themselves.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  4. #19
    Registered User
    Join Date
    Apr 2010
    Posts
    43
    MK27 here's the code from airodump source

    Code:
      /* update the window size */
    
                if( ioctl( 0, TIOCGWINSZ, &ws ) < 0 )
                {
                    ws.ws_row = 25;
                    ws.ws_col = 80;
                }
    
                if( ws.ws_col <   1 ) ws.ws_col =   1;
                if( ws.ws_col > 300 ) ws.ws_col = 300;

  5. #20
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Okay!

    I would guess that ioctl call returns an error (<0) when the program is not run in a terminal.

    Meaning the only solution is also the easy and obvious one: change that 80 to 120 and recompile the source.

    ps: ever heard of http://en.wikipedia.org/wiki/Astarte_(band) -- I seriously want a date with the bass player and need someone in Greece to hook me up!!!
    Last edited by MK27; 05-01-2010 at 05:56 PM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  6. #21
    Ultraviolence Connoisseur
    Join Date
    Mar 2004
    Posts
    555
    Quote Originally Posted by MK27 View Post
    You might want to read more than one post in the thread, nonpuz, just so everyone does not have to repeat themselves.
    My mistake, sorry.

    @op
    Edit: MK27 beat me

  7. #22
    Registered User
    Join Date
    Apr 2010
    Posts
    43
    i don't want to change the source of airodump :/ i need it as it comes with aircrack :/ any other solution? maybe if i use ioctl on my code?

  8. #23
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    I doubt it, but I can't say for sure and as I said, researching these ioctl things is an upriver swim. Really unlikely in any case, I think this is a legit oversight by the authors.

    Do you know how to write a patch? This makes it easy to mod source in a maintainable way, but it does mean you have to build from source and not use packages, which should not be a big deal.

    Oh, also, make sure you check my edit/"p.s" from #20, I'm totally serious.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  9. #24
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Oh also you should file a bug report or send some message to the aircrack team.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  10. #25
    Registered User
    Join Date
    Apr 2010
    Posts
    43
    if you want the bass player you have to help me :P. I'm sure there must be a way to bypass this s!@$!$@!.. :/

  11. #26
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    I think you are totally in the realm here where asking the dev team is your best bet. You are working on a GUI front end, right?

    Here's the FSF directory page for aircrack:

    aircrack - Free Software Directory - Free Software Foundation

    I can't guarantee that database is up to date (eg, the last version there is 2005), but if you flip around the tabs at the bottom, etc, you'll find the homepage, email contacts, etc.

    Actually it is out of date. Here's the current aircrack homepage:
    Aircrack-ng
    They're listing an IRC channel, a wiki, and a forum. Hopefully some email and bug reporting too. You've got the info you need. Go.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. #!/bin/bash question
    By elsheepo in forum C Programming
    Replies: 10
    Last Post: 03-08-2009, 11:42 PM