ptrac3 Posted June 30, 2012 Share Posted June 30, 2012 Very useful script, i'm using it a lot :) Quote Link to comment Share on other sites More sharing options...
PineDominator Posted July 9, 2012 Author Share Posted July 9, 2012 V1.3 added in DNSSpoof autostart changed /www/pineapple/dnsspoof/dnsspoof.sh added checking if usb was present and creates the log in /usb/logs/DNSSpoof-1.log keeps adding 1 to the end of the filename so the next time you run dnsspoof it's DNSSpoof-2.log Quote Link to comment Share on other sites More sharing options...
PineDominator Posted August 3, 2012 Author Share Posted August 3, 2012 (edited) 1.4 improved dnsspoof logs to usb, some code rework and aditional checks Edited August 3, 2012 by petertfm Quote Link to comment Share on other sites More sharing options...
NullNull Posted September 2, 2012 Share Posted September 2, 2012 Very nice script! I use it every time i reflash my pineapple! It would be very handy if you would use it not only after a reflash but multiple times, e.g. every time you want to turn on/off a feauter. For example autoStartRedirectAll. Because now if you run ti twice it is not so smooth... it adds the same lines without cheking them... Again VERY nice script! Quote Link to comment Share on other sites More sharing options...
PineDominator Posted September 2, 2012 Author Share Posted September 2, 2012 (edited) Very nice script! I use it every time i reflash my pineapple! It would be very handy if you would use it not only after a reflash but multiple times, e.g. every time you want to turn on/off a feauter. For example autoStartRedirectAll. Because now if you run ti twice it is not so smooth... it adds the same lines without cheking them... Again VERY nice script! I thought about that, I myself don't need that, I will have to see how Seb implements this so called back up feature. PS. because of my new module RandomRoll I disable this in the script now autoStartDNSSpoof=falseDNSSpoofRedirectAll=falserandomRoll=false[/CODE] Edited September 2, 2012 by petertfm Quote Link to comment Share on other sites More sharing options...
PineDominator Posted September 2, 2012 Author Share Posted September 2, 2012 (edited) v1.5 install reaver and mdk3 to usb and disabled random roll because of the module Edited September 2, 2012 by petertfm Quote Link to comment Share on other sites More sharing options...
rich- Posted September 4, 2012 Share Posted September 4, 2012 I dont know if it's I who are out on deep water or if it just dosent work for me. I just installed the latest dev firmware (2.6.3) I partitioned the USB according to the link: http://forums.hak5.o...82&hl=swap&st=0 I used SCP to copy the script over to /root/scripts/name-of-script.sh Issued the chmod +x name-of-script.sh Changed the timezone according to the wikipage, only used the first part of it as stated. ran it with ./name-of-script.sh When the warning about inserting USB came I plugged in the newly formatted USB-stick and waited. Below is the output. The question: Why didn't it install everything it should on the USB? : ( Output: Pineapple Mark 4 setup script created by petertfm Changing TimeZone: CET-1CEST Location: Europe/StockholmKarma AutoStart Enabled Installed DNSSpoof logs to usb by petertfmChanging SSID: AndroidAP Stealth AutoStart EnabledUpdateing fstab for use with swap partition Please Insert USB Drive!!!!!!!!!! Sleeping 30 seconds, Please insert USB drive or terrible things will happen!!!!!!!!!! Changing password for root New password: Bad password: similar to hostname Retype password: Password for root changed by root New password for root: pineapplesareyummy Warning if root password is lost serial connection is required!!! Quote Link to comment Share on other sites More sharing options...
PineDominator Posted September 4, 2012 Author Share Posted September 4, 2012 (edited) I dont know if it's I who are out on deep water or if it just dosent work for me. I just installed the latest dev firmware (2.6.3) I partitioned the USB according to the link: http://forums.hak5.o...82&hl=swap&st=0 I used SCP to copy the script over to /root/scripts/name-of-script.sh Issued the chmod +x name-of-script.sh Changed the timezone according to the wikipage, only used the first part of it as stated. ran it with ./name-of-script.sh When the warning about inserting USB came I plugged in the newly formatted USB-stick and waited. Below is the output. The question: Why didn't it install everything it should on the USB? : ( Output: Pineapple Mark 4 setup script created by petertfm Changing TimeZone: CET-1CEST Location: Europe/StockholmKarma AutoStart Enabled Installed DNSSpoof logs to usb by petertfmChanging SSID: AndroidAP Stealth AutoStart EnabledUpdateing fstab for use with swap partition Please Insert USB Drive!!!!!!!!!! Sleeping 30 seconds, Please insert USB drive or terrible things will happen!!!!!!!!!! Changing password for root New password: Bad password: similar to hostname Retype password: Password for root changed by root New password for root: pineapplesareyummy Warning if root password is lost serial connection is required!!! maybe setup the usb drive using the tutorial and then try the script there is a test in the script that checks for sda1, so that might be the issue. Edited September 4, 2012 by petertfm Quote Link to comment Share on other sites More sharing options...
rich- Posted September 4, 2012 Share Posted September 4, 2012 oh.. might haver overlooked that part... Did try to setup the USB now. but I got the following error in dmesg. [ 5347.360000] usb 1-1: new high-speed USB device number 7 using ehci-platform [ 5347.510000] scsi1 : usb-storage 1-1:1.0 [ 5348.510000] scsi 1:0:0:0: Direct-Access SanDisk Cruzer Fit 1.22 PQ: 0 ANSI: 5 [ 5348.510000] sd 1:0:0:0: Attached scsi generic sg0 type 0 [ 5348.530000] sd 1:0:0:0: [sda] 7821312 512-byte logical blocks: (4.00 GB/3.72 GiB) [ 5348.530000] sd 1:0:0:0: [sda] Write Protect is off [ 5348.540000] sd 1:0:0:0: [sda] Mode Sense: 43 00 00 00 [ 5348.540000] sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 5348.560000] sda: sda1 sda2 [ 5348.560000] sd 1:0:0:0: [sda] Attached SCSI removable disk [ 5349.600000] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null) [ 5384.200000] usb 1-1: reset high-speed USB device number 7 using ehci-platform [ 5399.320000] usb 1-1: device descriptor read/64, error -145 [ 5414.550000] usb 1-1: device descriptor read/64, error -145 [ 5414.780000] usb 1-1: reset high-speed USB device number 7 using ehci-platform [ 5429.900000] usb 1-1: device descriptor read/64, error -145 [ 5445.130000] usb 1-1: device descriptor read/64, error -145 [ 5445.360000] usb 1-1: reset high-speed USB device number 7 using ehci-platform [ 5450.390000] usb 1-1: device descriptor read/8, error -145 [ 5455.520000] usb 1-1: device descriptor read/8, error -145 [ 5455.750000] usb 1-1: reset high-speed USB device number 7 using ehci-platform [ 5460.780000] usb 1-1: device descriptor read/8, error -145 [ 5465.910000] usb 1-1: device descriptor read/8, error -145 [ 5466.020000] usb 1-1: USB disconnect, device number 7 [ 5466.020000] sd 1:0:0:0: Device offlined - not ready after error recovery [ 5466.040000] sd 1:0:0:0: [sda] Unhandled error code [ 5466.040000] sd 1:0:0:0: [sda] Result: hostbyte=0x01 driverbyte=0x00 [ 5466.040000] sd 1:0:0:0: [sda] CDB: cdb[0]=0x2a: 2a 00 00 00 16 6e 00 00 f0 00 [ 5466.050000] end_request: I/O error, dev sda, sector 5742 [ 5466.060000] sd 1:0:0:0: [sda] Unhandled error code [ 5466.060000] sd 1:0:0:0: [sda] Result: hostbyte=0x01 driverbyte=0x00 [ 5466.070000] sd 1:0:0:0: [sda] CDB: cdb[0]=0x2a: 2a 00 00 00 17 5e 00 00 f0 00 [ 5466.070000] end_request: I/O error, dev sda, sector 5982 [ 5466.080000] JBD2: I/O error detected when updating journal superblock for sda1-8. [ 5466.110000] Aborting journal on device sda1-8. [ 5466.110000] JBD2: I/O error detected when updating journal superblock for sda1-8. [ 5466.130000] journal commit I/O error [ 5466.250000] usb 1-1: new high-speed USB device number 8 using ehci-platform [ 5466.810000] EXT4-fs error (device sda1): ext4_put_super:818: Couldn't clean up the journal [ 5466.820000] EXT4-fs (sda1): Remounting filesystem read-only [ 5481.370000] usb 1-1: device descriptor read/64, error -145 [ 5496.600000] usb 1-1: device descriptor read/64, error -145 [ 5496.830000] usb 1-1: new high-speed USB device number 9 using ehci-platform [ 5511.950000] usb 1-1: device descriptor read/64, error -145 [ 5527.180000] usb 1-1: device descriptor read/64, error -145 [ 5527.410000] usb 1-1: new high-speed USB device number 10 using ehci-platform [ 5532.440000] usb 1-1: device descriptor read/8, error -145 [ 5537.570000] usb 1-1: device descriptor read/8, error -145 [ 5537.800000] usb 1-1: new high-speed USB device number 11 using ehci-platform [ 5542.830000] usb 1-1: device descriptor read/8, error -145 [ 5547.960000] usb 1-1: device descriptor read/8, error -145 [ 5548.070000] hub 1-0:1.0: unable to enumerate USB device on port 1 Could that be because I've already runned the script once and rebooted it and now trying to do this which should have been done before the script was run in the first place? Should I factory reset it and make it in the right order? Quote Link to comment Share on other sites More sharing options...
PineDominator Posted September 4, 2012 Author Share Posted September 4, 2012 oh.. might haver overlooked that part... Did try to setup the USB now. but I got the following error in dmesg. [ 5347.360000] usb 1-1: new high-speed USB device number 7 using ehci-platform [ 5347.510000] scsi1 : usb-storage 1-1:1.0 [ 5348.510000] scsi 1:0:0:0: Direct-Access SanDisk Cruzer Fit 1.22 PQ: 0 ANSI: 5 [ 5348.510000] sd 1:0:0:0: Attached scsi generic sg0 type 0 [ 5348.530000] sd 1:0:0:0: [sda] 7821312 512-byte logical blocks: (4.00 GB/3.72 GiB) [ 5348.530000] sd 1:0:0:0: [sda] Write Protect is off [ 5348.540000] sd 1:0:0:0: [sda] Mode Sense: 43 00 00 00 [ 5348.540000] sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 5348.560000] sda: sda1 sda2 [ 5348.560000] sd 1:0:0:0: [sda] Attached SCSI removable disk [ 5349.600000] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null) [ 5384.200000] usb 1-1: reset high-speed USB device number 7 using ehci-platform [ 5399.320000] usb 1-1: device descriptor read/64, error -145 [ 5414.550000] usb 1-1: device descriptor read/64, error -145 [ 5414.780000] usb 1-1: reset high-speed USB device number 7 using ehci-platform [ 5429.900000] usb 1-1: device descriptor read/64, error -145 [ 5445.130000] usb 1-1: device descriptor read/64, error -145 [ 5445.360000] usb 1-1: reset high-speed USB device number 7 using ehci-platform [ 5450.390000] usb 1-1: device descriptor read/8, error -145 [ 5455.520000] usb 1-1: device descriptor read/8, error -145 [ 5455.750000] usb 1-1: reset high-speed USB device number 7 using ehci-platform [ 5460.780000] usb 1-1: device descriptor read/8, error -145 [ 5465.910000] usb 1-1: device descriptor read/8, error -145 [ 5466.020000] usb 1-1: USB disconnect, device number 7 [ 5466.020000] sd 1:0:0:0: Device offlined - not ready after error recovery [ 5466.040000] sd 1:0:0:0: [sda] Unhandled error code [ 5466.040000] sd 1:0:0:0: [sda] Result: hostbyte=0x01 driverbyte=0x00 [ 5466.040000] sd 1:0:0:0: [sda] CDB: cdb[0]=0x2a: 2a 00 00 00 16 6e 00 00 f0 00 [ 5466.050000] end_request: I/O error, dev sda, sector 5742 [ 5466.060000] sd 1:0:0:0: [sda] Unhandled error code [ 5466.060000] sd 1:0:0:0: [sda] Result: hostbyte=0x01 driverbyte=0x00 [ 5466.070000] sd 1:0:0:0: [sda] CDB: cdb[0]=0x2a: 2a 00 00 00 17 5e 00 00 f0 00 [ 5466.070000] end_request: I/O error, dev sda, sector 5982 [ 5466.080000] JBD2: I/O error detected when updating journal superblock for sda1-8. [ 5466.110000] Aborting journal on device sda1-8. [ 5466.110000] JBD2: I/O error detected when updating journal superblock for sda1-8. [ 5466.130000] journal commit I/O error [ 5466.250000] usb 1-1: new high-speed USB device number 8 using ehci-platform [ 5466.810000] EXT4-fs error (device sda1): ext4_put_super:818: Couldn't clean up the journal [ 5466.820000] EXT4-fs (sda1): Remounting filesystem read-only [ 5481.370000] usb 1-1: device descriptor read/64, error -145 [ 5496.600000] usb 1-1: device descriptor read/64, error -145 [ 5496.830000] usb 1-1: new high-speed USB device number 9 using ehci-platform [ 5511.950000] usb 1-1: device descriptor read/64, error -145 [ 5527.180000] usb 1-1: device descriptor read/64, error -145 [ 5527.410000] usb 1-1: new high-speed USB device number 10 using ehci-platform [ 5532.440000] usb 1-1: device descriptor read/8, error -145 [ 5537.570000] usb 1-1: device descriptor read/8, error -145 [ 5537.800000] usb 1-1: new high-speed USB device number 11 using ehci-platform [ 5542.830000] usb 1-1: device descriptor read/8, error -145 [ 5547.960000] usb 1-1: device descriptor read/8, error -145 [ 5548.070000] hub 1-0:1.0: unable to enumerate USB device on port 1 Could that be because I've already runned the script once and rebooted it and now trying to do this which should have been done before the script was run in the first place? Should I factory reset it and make it in the right order? are you using a hub? I would re-flash and then re-setup your thumb drive, make sure it's working then run the script with the thumb drive out Quote Link to comment Share on other sites More sharing options...
rich- Posted September 4, 2012 Share Posted September 4, 2012 are you using a hub? I would re-flash and then re-setup your thumb drive, make sure it's working then run the script with the thumb drive out Nope, directly attached to both computer running linux when using disk util and directly attached to the pineapple IV when trying to install. I did try to put in the thunbdrive in the computer.. I get following error messages: [20168.421303] scsi 9:0:0:0: Direct-Access SanDisk Cruzer Fit 1.22 PQ: 0 ANSI: 5 [20168.421853] sd 9:0:0:0: Attached scsi generic sg2 type 0 [20168.424242] sd 9:0:0:0: [sdc] 7821312 512-byte logical blocks: (4.00 GB/3.72 GiB) [20168.425406] sd 9:0:0:0: [sdc] Write Protect is on [20168.425409] sd 9:0:0:0: [sdc] Mode Sense: 43 00 80 00 [20168.426132] sd 9:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [20168.437445] sdc: sdc1 sdc2 [20168.440647] sd 9:0:0:0: [sdc] Attached SCSI removable disk [20168.716122] EXT4-fs (sdc2): mounted filesystem with ordered data mode. Opts: (null) [20168.743040] EXT4-fs (sdc1): INFO: recovery required on readonly filesystem [20168.743043] EXT4-fs (sdc1): write access unavailable, cannot proceed [20169.094167] EXT4-fs (sdc1): INFO: recovery required on readonly filesystem [20169.094170] EXT4-fs (sdc1): write access unavailable, cannot proceed [20437.268613] usb 2-1: USB disconnect, device number 3 And when I tried to use it in gparted it did not work since it was read only. mount -o remount -o rw /dev/sdc{1,2} did not work either.. The current solution is that I am using another USB-drive instead.. this one seems to work prefectly. As from what I understand it seems like the 4gb sandisk is broken in some way, either the filesystem or something else. Quote Link to comment Share on other sites More sharing options...
PineDominator Posted September 4, 2012 Author Share Posted September 4, 2012 Nope, directly attached to both computer running linux when using disk util and directly attached to the pineapple IV when trying to install. I did try to put in the thunbdrive in the computer.. I get following error messages: [20168.421303] scsi 9:0:0:0: Direct-Access SanDisk Cruzer Fit 1.22 PQ: 0 ANSI: 5 [20168.421853] sd 9:0:0:0: Attached scsi generic sg2 type 0 [20168.424242] sd 9:0:0:0: [sdc] 7821312 512-byte logical blocks: (4.00 GB/3.72 GiB) [20168.425406] sd 9:0:0:0: [sdc] Write Protect is on [20168.425409] sd 9:0:0:0: [sdc] Mode Sense: 43 00 80 00 [20168.426132] sd 9:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [20168.437445] sdc: sdc1 sdc2 [20168.440647] sd 9:0:0:0: [sdc] Attached SCSI removable disk [20168.716122] EXT4-fs (sdc2): mounted filesystem with ordered data mode. Opts: (null) [20168.743040] EXT4-fs (sdc1): INFO: recovery required on readonly filesystem [20168.743043] EXT4-fs (sdc1): write access unavailable, cannot proceed [20169.094167] EXT4-fs (sdc1): INFO: recovery required on readonly filesystem [20169.094170] EXT4-fs (sdc1): write access unavailable, cannot proceed [20437.268613] usb 2-1: USB disconnect, device number 3 And when I tried to use it in gparted it did not work since it was read only. mount -o remount -o rw /dev/sdc{1,2} did not work either.. The current solution is that I am using another USB-drive instead.. this one seems to work prefectly. As from what I understand it seems like the 4gb sandisk is broken in some way, either the filesystem or something else. ouch sounds like you got the dredded sandisk write protection, there are alot of people experiencing this, I have 2 16 gig cruzers and all is fine, cross my fingers ps there doesn't seem to be a fix for this Quote Link to comment Share on other sites More sharing options...
rich- Posted September 4, 2012 Share Posted September 4, 2012 Ahh, of course, why keep things simple.. well it was only like $7 so not like the end of the world, just buy a new one and like stomp on this one :) Everything installed fine and looks good.. However when I look at the GUI of the Pineapple, it says I dont have any installed fusions. Is that corretct? Looking at the script it seems to install tcpdump, nmap, sslstrip, etc, etc.. but are those juse for CLI usage or have I misunderstood something now? : > Quote Link to comment Share on other sites More sharing options...
PineDominator Posted September 4, 2012 Author Share Posted September 4, 2012 Ahh, of course, why keep things simple.. well it was only like $7 so not like the end of the world, just buy a new one and like stomp on this one :) Everything installed fine and looks good.. However when I look at the GUI of the Pineapple, it says I dont have any installed fusions. Is that corretct? Looking at the script it seems to install tcpdump, nmap, sslstrip, etc, etc.. but are those juse for CLI usage or have I misunderstood something now? : > yes all those programs are installed to usb, the infusions are for the most part to extend the functionality of the pineapple by giving gui's for things like sslstrip and added features that are not includded in the origanal firmware Quote Link to comment Share on other sites More sharing options...
Gh3to Posted September 15, 2012 Share Posted September 15, 2012 Will this script work with the latest firmware update? Quote Link to comment Share on other sites More sharing options...
PineDominator Posted September 15, 2012 Author Share Posted September 15, 2012 Will this script work with the latest firmware update? no I have edited it and will update now, Version 2.0 I updated for the newest firmware 2.6.4up I also removed a few options because I feel my random roll module now takes care of those things removed Quote Link to comment Share on other sites More sharing options...
PineDominator Posted September 16, 2012 Author Share Posted September 16, 2012 version 2.1 added change pineapple ui port Quote Link to comment Share on other sites More sharing options...
PineDominator Posted October 14, 2012 Author Share Posted October 14, 2012 (edited) Version 3.0 Greatly improves package installation to usb, new sym links added after all packages are installed to give best compatibility. SSLStrip now has the lock icon when running. now asks you to insert usb then waits 15 seconds. lots of small improvements:-) Edited October 14, 2012 by petertfm Quote Link to comment Share on other sites More sharing options...
NullNull Posted October 14, 2012 Share Posted October 14, 2012 THANK YOU for your great work petertfm! :D I will try it as soon as i get back to my pineapple :D Quote Link to comment Share on other sites More sharing options...
ravenium Posted November 9, 2012 Share Posted November 9, 2012 Love this script - if you're anything like me (and it looks like you are!) you hate having to re-run the 50 different things when you need to reset. Plus, given that the MK4 is an evolving work, I'm always somewhat paranoid that older versions of modules will leave cruft behind. As such, I usually format my usb drive between upgrades. Anyhow, that being said, while this installs a nice number of modules, they don't seem to appear in the pineapple bar (infusions). Not sure if this is by design or because I have firmware 2.7 and this is for 2.6.4. Has anyone else seen this? Quote Link to comment Share on other sites More sharing options...
PineDominator Posted November 9, 2012 Author Share Posted November 9, 2012 Love this script - if you're anything like me (and it looks like you are!) you hate having to re-run the 50 different things when you need to reset. Plus, given that the MK4 is an evolving work, I'm always somewhat paranoid that older versions of modules will leave cruft behind. As such, I usually format my usb drive between upgrades. Anyhow, that being said, while this installs a nice number of modules, they don't seem to appear in the pineapple bar (infusions). Not sure if this is by design or because I have firmware 2.7 and this is for 2.6.4. Has anyone else seen this? Thanks:-) it doesnt install the infusions but rather the opkg packages needed to run the software. The infusions are just a way to controll aka GUI Quote Link to comment Share on other sites More sharing options...
ravenium Posted November 9, 2012 Share Posted November 9, 2012 Thanks:-) it doesnt install the infusions but rather the opkg packages needed to run the software. The infusions are just a way to controll aka GUI I was suspecting that the more I compared them (was installing one via opkg, then the infusion to see) and managed not to explode anything by doing so. On to figuring out my captive portal/BeEF idea (muahaha and such). Thanks again! Quote Link to comment Share on other sites More sharing options...
PineDominator Posted December 9, 2012 Author Share Posted December 9, 2012 Version 3.1 Aded the ability to create /www/library/test/success.html makes apple devices beleve there is internet while dnsspoofing without internet, IE using things like RandomRoll. Quote Link to comment Share on other sites More sharing options...
velkrosmaak Posted January 12, 2013 Share Posted January 12, 2013 I'm clearly being an idiot but all I get is this: if I run it with ./ I get an error that it can't find the script (even though the path was typed with autocomplete) if I run it with sh then I get this: : not foundh: line 2: : not foundh: line 7: : not foundh: line 8: : not foundh: line 9: : not foundh: line 19: : not foundh: line 20: : not foundh: line 28: : not foundh: line 31: : not foundh: line 34: : not foundh: line 35: : not foundh: line 37: : not foundh: line 44: : not foundh: line 45: : not foundh: line 48: : not foundh: line 51: : not foundh: line 55: : not foundh: line 56: echo petertfm Mark 4 setup script created by : not foundh: line 58: echo : not foundh: line 59: echo : not foundh: line 60: : not foundh: line 61: pinesetup.sh: line 395: syntax error: unexpected "fi" (expecting "then") I've tried it in the root, i've tried it in tmp and both with the same result. Obviously i'm missing something - derp derp derp Quote Link to comment Share on other sites More sharing options...
NullNull Posted January 12, 2013 Share Posted January 12, 2013 (edited) Did you tried this before you execute it with ./ ? "chmod +x pineapple-mk4-setup-script.sh" Edited January 12, 2013 by KiatoG 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.