Jump to content

Issues with sed and grep on a loot file


Recommended Posts

Hi guys,

I have trouble getting sed and grep on a text file looted using a modified samba exfiltrator.

I use firmware 1.6 and the command used to gather the IP addresses is "(Get-NetIPAddress -AddressFamily ipv4).IPAddress" (will later try to gather LAN IP addresses).

I tried the commands on Kali without an issue, but on the bash bunny it does not work as expected.

root@bunny:~# cat /loot/smb/e/DESKTOP-63THJCH/hacked.txt
root@bunny:~# cat /loot/smb/e/DESKTOP-63THJCH/hacked.txt | grep "169"
root@bunny:~# sed -i '/^169\.[0-9]/d' /loot/smb/e/DESKTOP-63THJCH/hacked.txt
root@bunny:~# sed '/^169\.[0-9]/d' /loot/smb/e/DESKTOP-63THJCH/hacked.txt


I am using the commands wrong ?


Link to comment
Share on other sites

  • 2 weeks later...

Hm, I tried the commands exactly as you posted here and it worked for me (on the bunny), so there isn't a mistake with the commands.

Try "apt-get upgrade grep", maybe that will help.

What also kind of annoys me are those  ▒▒. Try deleting those and try it again.


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...