Koeptis Posted April 23, 2020 Posted April 23, 2020 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 ▒▒172.16.64.10 192.168.56.1 169.254.42.194 169.254.8.188 169.254.247.206 169.254.150.40 192.168.1.48 127.0.0.1 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 ▒▒172.16.64.10 192.168.56.1 169.254.42.194 169.254.8.188 169.254.247.206 169.254.150.40 192.168.1.48 127.0.0.1 root@bunny:~# I am using the commands wrong ?
kuyaya Posted May 4, 2020 Posted May 4, 2020 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.