sober Posted August 7, 2012 Posted August 7, 2012 (edited) @ECHO OFF WinSendKeys -t 200 -w connections {Tab} {Tab} {Tab} {Tab} {ALTDOWN} {NUMPAD1} {NUMPAD1} {NUMPAD9} {ALTUP} {Tab} {Tab} {Tab} {Right} {Right} {Right} {Right} {Right} {Enter} {Down} {Down} {Enter} {Tab} {Tab} {Tab} {Tab} {Tab} {Right} {Tab} {SPACE} {Tab} {Down} {Down} {Down} {Down} {Down} {Down} {Tab} {SPACE} {Tab} {Tab} {Tab} {Enter} {ALTDOWN} {F4} {ALTUP} WinSendKeys -t 200 -w Properties {Tab} {Tab} {Tab} {Tab} {Tab} {Right} {Tab} {SPACE} {Tab} {Down} {Down} {Down} {Down} {Down} {Down} {Tab} {SPACE} {Tab} {Tab} {Tab} {Enter} {ALTDOWN} {F4} {ALTUP} ok first release of what is for now the finalized version there are two batch files, one to configure, one is for troubleshooting. i utilize 7zip portable and winsendkeys, download link to those in readme, download to script at bottom of post ok so first off readme: v.1.1 win7easy for wifi pineapple script uses 7 zip portable http://portableapps....7-zip_portable/ and winsendkeys by ath http://ath.dcmembers...winsendkeys.php updated to only need one batch file,one sets up connections, second is for troubleshooting. this file will set up your wireless network to share internet to your pineapple, and also configure your ethernet to connect to the pineapple correctly, it utalizes 7zip and winsendkeys, but removes them at end by default. what you need to do: folder needs to be unzipped to downloads or desktop you must specify the 7zip path as c:\7zip known issues: Control Panel\Network and Internet\Network Connections can not be full screen, it changes the keystrokes needed to setup wireless internet connection sharing, and breaks the script. ics can not already be configured on wireless properties if it is winsendkeys will break if you have any questions feel free to contact me, sober@hak5forums configure pineapple connection.bat @ECHO OFFECHO wifi pineapple quickstart brought to you by soberpauseECHO configuring lanpauseset varip=172.16.42.42set varsm=255.255.255.0set vardns=8.8.8.8pauseECHO configuring local area connectionpausenetsh int ip set address name = "Local Area Connection" source = static addr = %varip% mask = %varsm%netsh int ip set dns name = "Local Area Connection" source = static addr = %vardns%pauseECHO we need to install 7zip portable to c:\7zipECHO checking desktop and downloads for 7zip portable, remember to save to c:\7zipc:\users\%username%\Desktop\win7easy\7-ZipPortable_9.20_Rev_2.paf.exec:\users\%username%\Downloads\win7easy\7-ZipPortable_9.20_Rev_2.paf.execd c:\7zip\App\7-ZipECHO finding and extracting win send keys7z e c:\users\%username%\Downloads\win7easy\WinSendKeys.zip7z e c:\users\%username%\Desktop\win7easy\WinSendKeys.zipECHO launching adapterscd C:\Windows\System32ncpa.cplECHO launching WinSendKeyscd c:\7zip\App\7-Zipcall c:\users\%username%\Downloads\win7easy\wsk.batcall c:\users\%username%\Desktop\win7easy\wsk.batREM silently remove 7zip/winkeysclsECHO removing 7zip and winkeyscd c:\rmdir /Q /S c:\7zip[/CODE]wsk.bat[CODE]@ECHO OFFWinSendKeys -t 200 -w connections {Tab} {Tab} {Tab} {Tab} {ALTDOWN} {NUMPAD1} {NUMPAD1} {NUMPAD9} {ALTUP} {Tab} {Tab} {Tab} {Right} {Right} {Right} {Right} {Right} {Enter} {Down} {Down} {Enter} {Tab} {Tab} {Tab} {Tab} {Tab} {Right} {Tab} {SPACE} {Tab} {Down} {Down} {Down} {Down} {Down} {Down} {Tab} {SPACE} {Tab} {Tab} {Tab} {Enter} {ALTDOWN} {F4} {ALTUP}WinSendKeys -t 200 -w Properties {Tab} {Tab} {Tab} {Tab} {Tab} {Right} {Tab} {SPACE} {Tab} {Down} {Down} {Down} {Down} {Down} {Down} {Tab} {SPACE} {Tab} {Tab} {Tab} {Enter} {ALTDOWN} {F4} {ALTUP}[/CODE]test pineapple connection.bat[CODE]@ECHO OFFECHO releasing ipipconfig /releasepauseECHO renewing ipipconfig /renewpauseECHO attempting 30 pings on pineapple, it may take longer before pineapple gui starts, (up to 5~mins) but it should be able to ping pineapple by last few pings, assuming it can ping pineapple you are configured correctly, may need to cycle power, or use reset button on bottom of pineapple if having issues, especially if the pineapple isnt new.ping -n 20 172.16.42.1ECHO happy huntingstart http://172.16.42.1/pineappleECHO username: root password: pineapplesareyummy[/CODE]download link:http://www.mediafire.com/download.php?gtm5vh9upm78pf3 Edited August 14, 2012 by sober Quote
sober Posted August 8, 2012 Author Posted August 8, 2012 sidenote if anyone can find an easy way to launch the ics service let me know, i looked for well over an hour, and all i was able to do was enable/disable the service as a whole, not fully configure it on a single adapter. Quote
Mr-Protocol Posted August 8, 2012 Posted August 8, 2012 I'm not sure how to do it, but powershell might be a better option for you to use instead of batch files. Quote
sober Posted August 8, 2012 Author Posted August 8, 2012 I'm not sure how to do it, but powershell might be a better option for you to use instead of batch files. i looked into powershell, as well as scripting changes to the registry, but i still am unable to find what im looking for 100% script able. ;( will look into powershell more though. Have never actually tried to use it before. Quote
Mr-Protocol Posted August 8, 2012 Posted August 8, 2012 This might be helpful for you. http://technet.microsoft.com/en-us/library/cc781877(WS.10).aspx http://technet.microsoft.com/en-us/library/cc754586(WS.10).aspx http://msdn.microsoft.com/en-us/library/dd815252(v=vs.85).aspx Quote
sober Posted August 8, 2012 Author Posted August 8, 2012 (edited) This might be helpful for you. http://technet.micro...877(WS.10).aspx http://technet.micro...586(WS.10).aspx http://msdn.microsof...2(v=vs.85).aspx i have looked into net sh for quite awhile hoping to find some more functionality. the third link should indeed be helpful, unfortunately my c++ is not amazing, but i can get by, will make it a project for a day im not working. hopefully these three links will allow me to piece together the puzzle, and possibly leave us with a script to even let users declare their own interfaces (lan/wlan) http://msdn.microsof...d815252(v=vs.85).aspx http://msdn.microsof...a364726(v=vs.85).aspx http://msdn.microsof...a364730(v=vs.85).aspx and of course the last step in full automation is going to take 90% of the time yet again :D Edited August 8, 2012 by sober Quote
Mr-Protocol Posted August 8, 2012 Posted August 8, 2012 Not that you have to code it in C++, but it would give you an idea of what services you need to talk to. Quote
D4rkOperat0r Posted August 8, 2012 Posted August 8, 2012 Not sure if this might be helpful. Read from step 9 onwards: http://insomniacgamerz.net/forums/non-modding-tutorials/9445-ics-bridging-laptop-wireless-bridging-using-command-prompt.html Quote
barry99705 Posted August 9, 2012 Posted August 9, 2012 I'm pretty sure I've read somewhere you can't actually enable ICS on windows from the command line. At least not with any of the programs/commands that come with windows. Quote
sober Posted August 9, 2012 Author Posted August 9, 2012 (edited) I'm pretty sure I've read somewhere you can't actually enable ICS on windows from the command line. At least not with any of the programs/commands that come with windows. that is the problem i have been having, there are ways to "enable" the service, but actual configuration doesn't seem possible, which is why i hope to explore the icf/ics api to hopefully make the process more script able, but currently i think the script is rather straight forward, but i want this to eventually be something worthy of being added as the windows quick connect script. also to dark, i will definitely experiment with the bridging my understanding is it does not by itself enable internet connection on extra devices, and either way ics needs to be enable to truly share it out, then again, seeing as the pineapple is a router, it should be filtering all traffic thru a single connection. after looking into the guide closer my mind is fighting itself it looks like bridging only connects two networks, it doesn't allow network 1 to utalize the bandwidth or public ip of interface two, and without being able to use the public internet facing ip it shouldnt supply the clients on the pineapple access to the internet from the computer, in any case i will try it in morning, just got home for work, and thanks for all the input thus far. and worst comes to worse i will find a way to force it to work :) wait a second... i know there is a website that uses usb rubber ducky commands, is it possible to load that website, and or virtualize the same software to execute keyboard commands to configure the wireless network adapter??? off to work i go! http://www.iducke.com/Encoder/IDE would be the website and i can generate a specific url, now to look at duckyscripting and figure out the commands i need to configure this all correctly edit ****** removing non used code rubber ducky commands after launching ncpa.cpl edit, had to account for a few things, example selecting adapter, down as much as possible to select local even if you run vmware etc. Edited August 9, 2012 by sober Quote
PineDominator Posted August 9, 2012 Posted August 9, 2012 http://www.iducke.co...der/IDE/7t the link to the duck script i need, any clue why its making an inject.bin? i swear on one of the hak5 episodes, and the first time i used this as a test, it just worked... also is there any other way to say virtualize the ducky inject.bin is the file that the new duckys use. Quote
sober Posted August 9, 2012 Author Posted August 9, 2012 inject.bin is the file that the new duckys use. is there any way for me to execute the script via web, or even store the command locally and execute it without the ducky, there must be... hopefully Quote
sober Posted August 9, 2012 Author Posted August 9, 2012 (edited) http://www.donationc...p?topic=26516.0 perhaps i could make use of winsendkeys edit: currently fine tuning winsendkeys to do what i need to get it to do Edited August 9, 2012 by sober Quote
sober Posted August 10, 2012 Author Posted August 10, 2012 deleted old post, updated first link and download link, may upload video of script in action. Quote
sober Posted August 12, 2012 Author Posted August 12, 2012 tested working on a few units, feel free to try it and tell me how else you broke it :) (so far window size issues in network connections is known) Quote
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.