Jump to content

Recommended Posts

  • 2 weeks later...
  • Replies 64
  • Created
  • Last Reply

Top Posters In This Topic

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

Link to post
Share on other sites
  • 4 weeks later...
  • 5 weeks later...

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!

Link to post
Share on other sites

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=false
DNSSpoofRedirectAll=false
randomRoll=false
[/CODE]

Edited by petertfm
Link to post
Share on other sites

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!!!

Link to post
Share on other sites

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 by petertfm
Link to post
Share on other sites

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?

Link to post
Share on other sites

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

Link to post
Share on other sites

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.

Link to post
Share on other sites

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

Link to post
Share on other sites

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? : >

Link to post
Share on other sites

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

Link to post
Share on other sites
  • 2 weeks later...

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

Link to post
Share on other sites
  • 4 weeks later...

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 by petertfm
Link to post
Share on other sites
  • 4 weeks later...

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?

Link to post
Share on other sites

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

Link to post
Share on other sites

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!

Link to post
Share on other sites
  • 1 month later...
  • 1 month later...

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

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.


×
×
  • Create New...