{"id":16272051,"url":"https://github.com/sshh12/pwnsshh","last_synced_at":"2026-02-10T18:09:44.316Z","repository":{"id":70737752,"uuid":"97251695","full_name":"sshh12/PwnSSHH","owner":"sshh12","description":"Python wrapper for the MR3040.","archived":false,"fork":false,"pushed_at":"2017-07-15T20:04:26.000Z","size":26,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-16T11:58:53.221Z","etag":null,"topics":["minipwner","mr3040","pineapple","tp-link"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sshh12.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-14T16:09:39.000Z","updated_at":"2019-08-04T12:17:50.000Z","dependencies_parsed_at":"2023-02-21T20:31:44.684Z","dependency_job_id":null,"html_url":"https://github.com/sshh12/PwnSSHH","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sshh12/PwnSSHH","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshh12%2FPwnSSHH","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshh12%2FPwnSSHH/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshh12%2FPwnSSHH/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshh12%2FPwnSSHH/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sshh12","download_url":"https://codeload.github.com/sshh12/PwnSSHH/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshh12%2FPwnSSHH/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29310072,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T17:48:59.043Z","status":"ssl_error","status_checked_at":"2026-02-10T17:45:37.240Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["minipwner","mr3040","pineapple","tp-link"],"created_at":"2024-10-10T18:15:56.249Z","updated_at":"2026-02-10T18:09:44.301Z","avatar_url":"https://github.com/sshh12.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# PwnSSHH\n\nA Python wrapper for the MR3040.\n\n## Usage\n\n#### Setting Up Device\nInstructions heavily based on the [minipwner](http://www.minipwner.com/index.php/build-one).\n1. Have a [TP-Link MR3040](https://www.amazon.com/gp/product/B0088PPFP4/), [USB flash drive](https://www.amazon.com/gp/product/B005FYNSZA/), Wi-Fi internet connection, and an Ethernet cable.\n2. Partition the USB flash drive with a tool like [Partition Wizard](https://www.partitionwizard.com/) or [gparted](http://gparted.org/)\nto have about 96% ext4 and the rest as Linux swap.\n3. Download the [OpenWrt image builder](https://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/OpenWrt-ImageBuilder-15.05.1-ar71xx-generic.Linux-x86_64.tar.bz2)\nand uncompress (```tar xvzf {filename}```).\n4. ```make image PROFILE=TLMR3040 PACKAGES=\"blkid block-mount kmod-fs-ext4 kmod-usb2 kmod-usb-uhci kmod-usb-ohci kmod-usb-storage\"```\n5. Rename the created image file ```bin/ar71xx/openwrt-15.05.1-ar71xx-generic-tl-mr3040-v2-squashfs-factory.bin``` to ```openwrt.bin```\n6. Put the switch on 3G/4G, connect it to your computer with an Ethernet cord, and power on the device.\n5. Navigate to the TP-Link control panel at ```http://192.168.0.1```, then go to System tools -\u003e Firmware Upgrade and upload the ```openwrt.bin``` image file.\n6. ```telnet 192.168.1.1 23``` and set the password ```passwd``` to enable ssh (no longer need telnet).\n7. ```ssh root@192.168.1.1```\n8. Edit the fstab config ```vi /etc/config/fstab``` where partitions can be ```sda1``` or ```sda2```\n```\nconfig 'global'\n        option  anon_swap       '0'\n        option  anon_mount      '0'\n        option  auto_swap       '1'\n        option  auto_mount      '1'\n        option  delay_root      '0'\n        option  check_fs        '0'\n\nconfig 'swap'\n        option device '/dev/{swap partition}'\n        option enabled '1'\n\nconfig 'mount'\n        option target '/overlay'\n        option device '/dev/{ext4 partition}'\n        option fstype 'ext4'\n        option options 'rw,sync'\n        option enabled '1'\n        option enabled_fsck '0'\n```\n9. Pivot the root onto the USB drive with the following commands:\n```\nmkdir -p /tmp/cproot\nmount -o bind / /tmp/cproot\nmkdir /mnt/{ext4 partition}\nmount /dev/{ext4 partition} /mnt/{ext4 partition}\ntar -C /tmp/cproot -cvf - . | tar -C /mnt/{ext4 partition} -xf -\numount /tmp/cproot\n```\n10. Change the mount target in ```/etc/config/fstab``` from ```'/overlay'``` to ```'/'```\n11. ```reboot```\n\n#### Setting Up PwnSSHH\n1. On main computer, ```git clone https://github.com/sshh12/PwnSSHH.git```\n2. Copy files to device ```scp -r /path/to/PwnSSHH root@192.168.1.1:/root/PwnSSHH```\n3. ```python /root/PwnSSHH/setup.py``` (This will override config files, banners, etc...)\n4. ```reboot```\n\n#### Using\n1. PwnSSHH with automatically start on boot and will cycle the leds to indicate startup.\n2. The program can be started manually with ```python /root/PwnSSHH/main.py```.\n\n#### API\nIf you want to write your own code, the ```pwnsshh``` lib will allow you to interface\n(read switch state, control leds, init configs, etc...) with the router.\n\nFor example:\n```python\nfrom pwnsshh.switch import get_switch_id\nfrom pwnsshh.leds import all_off, leds\n\nimport time\n\nall_off() # Turn off all leds\n\nlast_pos = 0\n\nwhile True: # Poll switch state\n\n    switch = get_switch_id() # Index of the switch position {0, 1, 2}\n\n    if switch != last_pos:\n\n        leds[last_pos].on = False\n        leds[switch].on = True # Light corresponding led\n\n        last_pos = switch\n\n    time.sleep(1) # Commands can get buggy if not enough delay\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsshh12%2Fpwnsshh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsshh12%2Fpwnsshh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsshh12%2Fpwnsshh/lists"}