티스토리 뷰
This post is a cheat sheet for MongoDB. This cheat sheet is not technical, maybe you can use this when you cooking.
# Find all data in collection
Usage:
db.collection.find({})
# Find if it has specific key
Syntax: $exists
{<Field>: {$exists: <boolean>}}
Usage:
db.collection.find({"field": {"$exists": true}})
Reference:
http://docs.mongodb.org/manual/reference/operator/query/exists/
# Delete Key ( $unset )
Syntax: $unset
{$unset : {<Field>: "", ...}}
Usage:
db.collection.update({"field": condition}, {"$unset": {"del_key_field": ""}})
-> In unset operation, empty string value of "del_key" key means nothing
If you use it then delete only one document. So, if you want to delete multiple document which satisfied by the condition, then setting upsert as False and multiple as True like this
db.collection.update({"field": condition}, {"$unset": {"del_key_field": ""}}, false, true)
The 3rd option is upsert (False), and the 4th option is multiple.
Reference:
http://docs.mongodb.org/manual/reference/operator/update/unset/
- Total
- Today
- Yesterday
- IE 10 리버싱
- WinDbg
- IE 10 Exploit Development
- CTF Write up
- 데이터 마이닝
- 2015 School CTF
- expdev 번역
- IE 11 exploit
- IE UAF
- Mona 2
- 2014 SU CTF Write UP
- UAF
- IE 11 UAF
- Use after free
- IE 11 exploit development
- heap spraying
- data mining
- 윈도우즈 익스플로잇 개발
- School CTF Write up
- School CTF Writeup
- TenDollar
- IE 10 익스플로잇
- TenDollar CTF
- IE 10 God Mode
- 힙 스프레잉
- shellcode writing
- Windows Exploit Development
- 쉘 코드
- shellcode
- 쉘 코드 작성
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |