Bob123 Posted October 2, 2021 Share Posted October 2, 2021 Hello. So I have a python script I'd like to have the packet squirrel run. I put the script and a payload.sh that calls the script on switch2. From arming mode I can run that script and it works. But from the switch2 position it doesn't work. The python script has a set IP for a device it's going to communicate with and I can do one of two things, I can put the packet squirrel inline with the device or I can just plop the packet squirrel on the same network as the device. Which is recommended? If I just plop it on the network which port do I use? Which network mode should I have it in? The network is DHCP and the device has a known address. All I need the packet squirrel to do is get an IP and run the python script. Any help would be great. Thanks. Quote Link to comment Share on other sites More sharing options...
prima Posted October 2, 2021 Share Posted October 2, 2021 Not enough information. What does your Python script do, and most important: how is it started ? It could be that networking is not even ready, thus your script fails. Does your script generate a log ? If not I strongly recommend to use the logging module in python. But since you mention switch #2, that should be this: Spoofing DNS. And: Quote By default the payload is configured to spoof all requests with the IP address of the Packet Squirrel. Maybe that your problem. Quote Link to comment Share on other sites More sharing options...
Bob123 Posted October 3, 2021 Author Share Posted October 3, 2021 No I wrote my own python script and then my own payload.sh to call that python script. It has nothing to do with what would normally be on switch 2. I could have picked any switch but I have usable payloads on switches 1 and 3 which is why I chose switch 2. But yes I'm going to look into delaying it and also I want to try to get the button to work as well. And to keep it simple, my python script talks to a device that turns on and off a light. That all works so I'm not concerned about that. I just want to understand what the two Ethernet ports do on a switch position vs arming. Cause again I can manually trigger it in arming mode all day long. Thanks. Quote Link to comment Share on other sites More sharing options...
Bob123 Posted October 3, 2021 Author Share Posted October 3, 2021 Yay it works. I had a few issues, first being the original payload.sh I renamed to payload.sh.old, yeah it didn't like that. So I removed that. I also had a bunch of install scripts for the python libraries I had to manually load in, don't know for sure if it didn't like them but I also cleaned them out of switch2. I also took the time to program in the button and put it in a loop. So now when the payload loads, I get NAT (which I still want to understand better (see the end of my post)) and then waits till I press the button. Then after a button press my device turns a light on via the python script I wrote. Another press of the button shuts the light back off. And so on. Nothing special, just a proof of concept. Next what I'm after is my original question, besides running the packet squirrel inline with my network and my device, I'd like to see if I can just plop the packet squirrel on my network and have it see the device on my main network rather than the packet squirrel assigning it an IP like it does in NAT. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.