mitmdump error /usr/bin/mitmdump no such scripts

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I am trying to set intercept traffic from my phone using ARPspoof and inject a javascript header into the page.



Before I started I entered these commands:



echo 1 > /proc/sys/net/ipv4/ip_forward
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo iptables -A FORWARD -i wlan0 -o eth1 -j ACCEPT
sudo iptables -A FORWARD -i eth1 -o wlan0 -j ACCEPT
sudo iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 8080
sudo iptables -t nat -A PREROUTING -p tcp --destination-port 443 -j REDIRECT --to-port 8080


To intercept the traffic, I entered these commands:



sudo arpspoof -i wlan0 -t <phone_ip_here> <router_ip_here>
sudo arpspoof -i wlan0 -t <router_ip_here> <phone_ip_here>


And I started a web server to deploy the javascript file that will be embedded in each webpage that the phone receives



This web server will be hosted on the Kali computer's IP at port 8000



sudo python3 httpServer.py


And finally when I run mitmdump I get this error:



mitmdump -s 'injector.py http://<kali_computer_ip>:8000/script.js'


Error Message:



/usr/bin/mitmdump: No such script


I am not sure what I am doing wrong, If I do execute mitmproxy with the command:



mitmproxy -p 8080


The traffic does get routed to mitmproxy HOWEVER, I get a 400 Bad Request Error on my phone's browser and mitmproxy returns http protocol error.



Any help or suggestions will be warmly welcomed.







share|improve this question























    up vote
    0
    down vote

    favorite












    I am trying to set intercept traffic from my phone using ARPspoof and inject a javascript header into the page.



    Before I started I entered these commands:



    echo 1 > /proc/sys/net/ipv4/ip_forward
    sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
    sudo iptables -A FORWARD -i wlan0 -o eth1 -j ACCEPT
    sudo iptables -A FORWARD -i eth1 -o wlan0 -j ACCEPT
    sudo iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 8080
    sudo iptables -t nat -A PREROUTING -p tcp --destination-port 443 -j REDIRECT --to-port 8080


    To intercept the traffic, I entered these commands:



    sudo arpspoof -i wlan0 -t <phone_ip_here> <router_ip_here>
    sudo arpspoof -i wlan0 -t <router_ip_here> <phone_ip_here>


    And I started a web server to deploy the javascript file that will be embedded in each webpage that the phone receives



    This web server will be hosted on the Kali computer's IP at port 8000



    sudo python3 httpServer.py


    And finally when I run mitmdump I get this error:



    mitmdump -s 'injector.py http://<kali_computer_ip>:8000/script.js'


    Error Message:



    /usr/bin/mitmdump: No such script


    I am not sure what I am doing wrong, If I do execute mitmproxy with the command:



    mitmproxy -p 8080


    The traffic does get routed to mitmproxy HOWEVER, I get a 400 Bad Request Error on my phone's browser and mitmproxy returns http protocol error.



    Any help or suggestions will be warmly welcomed.







    share|improve this question





















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I am trying to set intercept traffic from my phone using ARPspoof and inject a javascript header into the page.



      Before I started I entered these commands:



      echo 1 > /proc/sys/net/ipv4/ip_forward
      sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
      sudo iptables -A FORWARD -i wlan0 -o eth1 -j ACCEPT
      sudo iptables -A FORWARD -i eth1 -o wlan0 -j ACCEPT
      sudo iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 8080
      sudo iptables -t nat -A PREROUTING -p tcp --destination-port 443 -j REDIRECT --to-port 8080


      To intercept the traffic, I entered these commands:



      sudo arpspoof -i wlan0 -t <phone_ip_here> <router_ip_here>
      sudo arpspoof -i wlan0 -t <router_ip_here> <phone_ip_here>


      And I started a web server to deploy the javascript file that will be embedded in each webpage that the phone receives



      This web server will be hosted on the Kali computer's IP at port 8000



      sudo python3 httpServer.py


      And finally when I run mitmdump I get this error:



      mitmdump -s 'injector.py http://<kali_computer_ip>:8000/script.js'


      Error Message:



      /usr/bin/mitmdump: No such script


      I am not sure what I am doing wrong, If I do execute mitmproxy with the command:



      mitmproxy -p 8080


      The traffic does get routed to mitmproxy HOWEVER, I get a 400 Bad Request Error on my phone's browser and mitmproxy returns http protocol error.



      Any help or suggestions will be warmly welcomed.







      share|improve this question











      I am trying to set intercept traffic from my phone using ARPspoof and inject a javascript header into the page.



      Before I started I entered these commands:



      echo 1 > /proc/sys/net/ipv4/ip_forward
      sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
      sudo iptables -A FORWARD -i wlan0 -o eth1 -j ACCEPT
      sudo iptables -A FORWARD -i eth1 -o wlan0 -j ACCEPT
      sudo iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 8080
      sudo iptables -t nat -A PREROUTING -p tcp --destination-port 443 -j REDIRECT --to-port 8080


      To intercept the traffic, I entered these commands:



      sudo arpspoof -i wlan0 -t <phone_ip_here> <router_ip_here>
      sudo arpspoof -i wlan0 -t <router_ip_here> <phone_ip_here>


      And I started a web server to deploy the javascript file that will be embedded in each webpage that the phone receives



      This web server will be hosted on the Kali computer's IP at port 8000



      sudo python3 httpServer.py


      And finally when I run mitmdump I get this error:



      mitmdump -s 'injector.py http://<kali_computer_ip>:8000/script.js'


      Error Message:



      /usr/bin/mitmdump: No such script


      I am not sure what I am doing wrong, If I do execute mitmproxy with the command:



      mitmproxy -p 8080


      The traffic does get routed to mitmproxy HOWEVER, I get a 400 Bad Request Error on my phone's browser and mitmproxy returns http protocol error.



      Any help or suggestions will be warmly welcomed.









      share|improve this question










      share|improve this question




      share|improve this question









      asked May 27 at 9:27









      SidS

      1011




      1011




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          mitmdump -s 'injector.py http://<kali_computer_ip>:8000/script.js'


          Pay close attention to the single quotes. The -s option to mitmdump specifies the name of the script to run. Here, you're effectively telling the computer that the name of the script is



          injector.py<space>http://<kali_computer_ip>:8000/script.js


          Since the filename injector.py does not have any special characters in it, it does not need to be quoted. The URL, on the other hand, might need quoting if it contains a question mark or other characters that have a special meaning for the shell. So assuming that the injector.py is located in the current directory where you're executing this command, I think this might do what you want:



          mitmdump -s injector.py 'http://<kali_computer_ip>:8000/script.js'





          share|improve this answer





















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );








             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f446289%2fmitmdump-error-usr-bin-mitmdump-no-such-scripts%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            mitmdump -s 'injector.py http://<kali_computer_ip>:8000/script.js'


            Pay close attention to the single quotes. The -s option to mitmdump specifies the name of the script to run. Here, you're effectively telling the computer that the name of the script is



            injector.py<space>http://<kali_computer_ip>:8000/script.js


            Since the filename injector.py does not have any special characters in it, it does not need to be quoted. The URL, on the other hand, might need quoting if it contains a question mark or other characters that have a special meaning for the shell. So assuming that the injector.py is located in the current directory where you're executing this command, I think this might do what you want:



            mitmdump -s injector.py 'http://<kali_computer_ip>:8000/script.js'





            share|improve this answer

























              up vote
              0
              down vote













              mitmdump -s 'injector.py http://<kali_computer_ip>:8000/script.js'


              Pay close attention to the single quotes. The -s option to mitmdump specifies the name of the script to run. Here, you're effectively telling the computer that the name of the script is



              injector.py<space>http://<kali_computer_ip>:8000/script.js


              Since the filename injector.py does not have any special characters in it, it does not need to be quoted. The URL, on the other hand, might need quoting if it contains a question mark or other characters that have a special meaning for the shell. So assuming that the injector.py is located in the current directory where you're executing this command, I think this might do what you want:



              mitmdump -s injector.py 'http://<kali_computer_ip>:8000/script.js'





              share|improve this answer























                up vote
                0
                down vote










                up vote
                0
                down vote









                mitmdump -s 'injector.py http://<kali_computer_ip>:8000/script.js'


                Pay close attention to the single quotes. The -s option to mitmdump specifies the name of the script to run. Here, you're effectively telling the computer that the name of the script is



                injector.py<space>http://<kali_computer_ip>:8000/script.js


                Since the filename injector.py does not have any special characters in it, it does not need to be quoted. The URL, on the other hand, might need quoting if it contains a question mark or other characters that have a special meaning for the shell. So assuming that the injector.py is located in the current directory where you're executing this command, I think this might do what you want:



                mitmdump -s injector.py 'http://<kali_computer_ip>:8000/script.js'





                share|improve this answer













                mitmdump -s 'injector.py http://<kali_computer_ip>:8000/script.js'


                Pay close attention to the single quotes. The -s option to mitmdump specifies the name of the script to run. Here, you're effectively telling the computer that the name of the script is



                injector.py<space>http://<kali_computer_ip>:8000/script.js


                Since the filename injector.py does not have any special characters in it, it does not need to be quoted. The URL, on the other hand, might need quoting if it contains a question mark or other characters that have a special meaning for the shell. So assuming that the injector.py is located in the current directory where you're executing this command, I think this might do what you want:



                mitmdump -s injector.py 'http://<kali_computer_ip>:8000/script.js'






                share|improve this answer













                share|improve this answer



                share|improve this answer











                answered May 27 at 11:13









                telcoM

                10.1k11032




                10.1k11032






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f446289%2fmitmdump-error-usr-bin-mitmdump-no-such-scripts%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Displaying single band from multi-band raster using QGIS

                    How many registers does an x86_64 CPU actually have?