Commit Graph

38 Commits (c2f279a8d65e7f45de7591fe1aae3146012bf2b2)

Author SHA1 Message Date
Mike Kershaw / Dragorn c2f279a8d6 gpio: Fix GPIO handling for modern openwrt, handle sharkjack-cable
detection, temporarily don't halt on battery conditions
2023-08-02 16:36:25 -04:00
Mike Kershaw / Dragorn 9a6e5984a8 network: Tweak network config 2023-08-01 16:40:10 -04:00
Marc 41afccfce2
etc: Add newline to banner 2021-08-23 20:08:41 +01:00
Marc eee956774e
bin: Point download towards correct model 2021-08-23 20:07:08 +01:00
Marc b41b65a27c
bin: Add cable check to framework updater 2021-08-23 19:32:29 +01:00
Marc 5e3b4e3928
bin: Add SERIAL_WRITE output for link waiting and payload execution 2021-08-23 19:30:14 +01:00
Marc fece2024ae
usr/bin: Fix bad if statement in UPDATE_FIRMWARE 2021-08-17 23:07:51 +01:00
Marc ed8d755436
root: Update default payload 2021-08-17 21:36:39 +01:00
Marc 1fe19cb021
etc: Add rc.local 2021-08-17 21:33:35 +01:00
Marc 2ceb2ba7d4
Helpers: Fix payload location in ACTIVATE 2021-08-17 21:26:17 +01:00
Marc 9c6f8c8dc7
Files: Bump version 2021-08-16 19:50:38 +01:00
Marc a1299b1de7
Files: Add new helpers 2021-08-16 19:50:14 +01:00
Zero_Chaos 5aa0ef7c56 Housekeeping (#7)
* fix LED killing

* do not autostart unneeded services

ntp: we don't want to leak in attack mode and arming mode doesn't even
have internet.  user's who want this can start it themselves
dnsmasq: we should start this when needed rather than killing it when
not needed, speed boot by not starting then killing

* NETMODE: use dnsmasq

netmode was improperly calling odhcpd when we use dnsmasq, just call
dnsmasq

* start dnsmasq when needed

have shark service start dnsmasq in arming mode and stop it in attack
and off mode

* randomize mac with macchanger

currently mac is randomized because it is unable to read the actual mac.
If there gets fixed then the mac won't be randomized.  Let's
intentionally randomize the mac to be sure we are random enough

* ensure netmode dhcp_server provides default gateway

* prototype out switching between gateway and no gateway

* actually disable gateway in arming mode

* disable openvpn

I don't know why this is trying to start, but let's not

* better LED anti-suicide

* permissions count

* execute_payload: fix shellcheck warnings

* convert BATTERY to posix

runtime cut from 0.051s to 0.021s on average

* shellcheck cleanup

simplify script while doing it, use faster sh instead of bash

* DO_A_BARREL_ROOL: this was posix anyway, so use posix

* execute_payload: mostly posix, consider refactor

* cleanup LED a bit

partially elminate bashisms when possible to do cleanly
shellcheck fixes for anti-hari kari (and it's faster)

* POSIX NETMODE

this was already posix except for function definitions

* POSIX shark_framework

fix minor logic error and posixify

* shark_framework: save an awk

* SWITCH: posix

* LED: fix logic for SC2015 warnings

* move wait_for_link and add wait_for_no_link

a few additional fixes based on testing

* fix macchanger and wait_for_link

* remove unneeded note

* This is where you change the mac address

* We do not need network in off mode, no services anyway

* ensure no dhcp during attack mode until requested

* bash or python, but not php

* The function is simple enough to not need a comment --Foxtrot
2020-01-24 02:44:17 +00:00
Marc 6cb3073db3
Merge pull request #3 from ZeroChaos-/extensions
add extension support
2020-01-07 20:14:03 +00:00
Rick Farina (Zero_Chaos) 7b5f8421e9
The 2020-01-07 15:13:31 -05:00
Marc 8dc7469f35
Merge pull request #4 from ZeroChaos-/netmode_auto
netmode fixes and auto mode
2020-01-07 20:12:35 +00:00
Rick Farina (Zero_Chaos) d82bac8ed9
this is how it works right ¯\_(ツ)_/¯ 2019-12-27 22:15:11 -05:00
Rick Farina (Zero_Chaos) 115ed70646
timeout from busybox needs -t 2019-12-23 22:14:44 -05:00
Marc d12bb3221a
Merge pull request #6 from ZeroChaos-/switch
shellcheck switch
2019-12-13 22:02:32 +00:00
Rick Farina (Zero_Chaos) b224a42e94
this bothers me so much, executables need to be executable 2019-12-13 16:45:24 -05:00
Rick Farina (Zero_Chaos) 758b509dea
and I'm all out of gum 2019-12-13 16:31:25 -05:00
Rick Farina (Zero_Chaos) 55c0f683ca
do not override user led in ARMING mode
arming mode basically sits in idle mode all the time, which means led
status is set once per second.  this makes it impossible to set user led
status in arming mode (testing, development, whatever).  Add a simple
check to not override user set led status.
2019-12-13 15:03:39 -05:00
Rick Farina (Zero_Chaos) ca54f29c7f
fix the pre-existing issue of DHCP_SERVER not working 2019-12-13 14:51:41 -05:00
Rick Farina (Zero_Chaos) cc8fb902f8
finish shellcheck fixes for fun 2019-12-13 13:48:50 -05:00
Rick Farina (Zero_Chaos) 534d8cc12c
it is the little things that count 2019-12-12 21:53:50 -05:00
Marc b767b2f4ae
Merge pull request #5 from ZeroChaos-/mii-swconfig
okay, that was mii fault
2019-12-13 02:11:27 +00:00
Rick Farina (Zero_Chaos) 0ad786adac
okay, that was mii fault
mii-tool doesn't work on the SIX PORT SWITCH that the shark thinks it
is.  Foxtrot was kind enough to point me to swconfig.  This is tested
and functional 🇺🇸 🇺🇸 🚀 🇬🇧
2019-12-12 21:08:17 -05:00
Rick Farina (Zero_Chaos) bff3daee88
something like this, I think 2019-12-12 17:06:00 -05:00
Rick Farina (Zero_Chaos) 60cc5d98f5
introduce netmode auto
who wouldn't want a sweet feature like this?
2019-12-12 14:14:31 -05:00
Rick Farina (Zero_Chaos) 52f3349406
handle user calling NETMODE more than once
if user calls NETMODE and changes from dhcp server to client it leaves
  the dhcpd running. stop that
2019-12-12 13:56:48 -05:00
Rick Farina (Zero_Chaos) 93a23d1eb9
add extension support 2019-12-12 13:46:46 -05:00
Rick Farina (Zero_Chaos) 3f7825b03a
move /usr/lib/config to /usr/lib/hak5/shark 2019-12-12 12:33:37 -05:00
Marc 9febcdee41
Merge pull request #1 from ZeroChaos-/master
stop killing random processes that happen to include LED in their inv…
2019-12-12 16:45:26 +00:00
Marc f03627b8cc
Merge pull request #2 from ZeroChaos-/wait_for_link
wait_for_link
2019-12-12 16:45:16 +00:00
Rick Farina (Zero_Chaos) a852ea7c4e
fix indent for my master, foxtrot 2019-12-12 11:43:27 -05:00
Rick Farina (Zero_Chaos) f3bf662795
wait_for_link
don't blindly execute the payload, wait for a link first at least
2019-12-12 10:45:14 -05:00
Rick Farina (Zero_Chaos) 3deab088fa
stop killing random processes that happen to include LED in their invocation 2019-12-12 10:27:59 -05:00
Marc 49cbd4460d Files: Initial commit of Shark files 2019-12-11 21:11:53 +00:00