Comments (1)
Hello,
Unfortunately, we don't think that the goal of pywerview
(used as a tool) is to perform "heavy" modifications/filtering on the returned results. Complex handling must be implemented in a separate script with pywerview
used as a library.
However, as pywerview
can return json results, you can use powerful (but not so friendly 😞) tools such as jq
:
Filter: jq '.results | .[] | {rid: (.objectsid | split("-") | .[-1]), dn: .distinguishedname, objectsid: .objectsid, name: .name} | select((.rid | tonumber)>1000)
Example:
$ python pywerview.py get-netgroup -w domain.org -u user -p Password123 -t 172.16.0.120 --json --full-data | jq '.results | .[] | {rid: (.objectsid | split("-") | .[-1]), dn: .distinguishedname, objectsid: .objectsid, name: .name} | select((.rid | tonumber)>1000)'
{
"rid": "1143",
"dn": "CN=TestGroup,CN=Users,DC=domain,DC=org",
"objectsid": "S-1-5-21-507154964-1282889071-1089825736-1143",
"name": "TestGroup"
}
{
"rid": "1128",
"dn": "CN=a,CN=Users,DC=domain,DC=org",
"objectsid": "S-1-5-21-507154964-1282889071-1089825736-1128",
"name": "a"
}
{
"rid": "1126",
"dn": "CN=ATA_TEST,CN=Users,DC=domain,DC=org",
"objectsid": "S-1-5-21-507154964-1282889071-1089825736-1126",
"name": "ATA_TEST"
}
{
"rid": "1103",
"dn": "CN=DnsUpdateProxy,CN=Users,DC=domain,DC=org",
"objectsid": "S-1-5-21-507154964-1282889071-1089825736-1103",
"name": "DnsUpdateProxy"
}
{
"rid": "1102",
"dn": "CN=DnsAdmins,CN=Users,DC=domain,DC=org",
"objectsid": "S-1-5-21-507154964-1282889071-1089825736-1102",
"name": "DnsAdmins"
}
(full disclosure: I'm not yet a jq
ninja, so there is maybe a more efficient way to do that)
Let me know if it helps you.
Closing your issue now.
🌻
from pywerview.
Related Issues (20)
- UnicodeDecodeError in invoke-userhunter (develop branch) HOT 2
- Get-NetGroupMember does not work against "Domain Users" group HOT 5
- Any chance of adding kerberos auth? HOT 4
- LDAPSearchError HOT 3
- Return JSON objects HOT 2
- TypeError: 'NoneType' object is not iterable HOT 1
- port to Python 3 HOT 7
- Kali 2020 compatibility HOT 5
- Invoke-ACLScanner port HOT 3
- pycrypto module requirement HOT 7
- get-objectacl HOT 1
- Get-netcomputer didn't return all the computers HOT 4
- AttributeError: 'int' object has no attribute 'hex' HOT 2
- Enumerate the state of TGT delegation HOT 3
- TypeError: unhashable type: 'list' HOT 3
- TypeError: __init__() takes 13 positional arguments but 14 were given HOT 4
- pywerview_main_logger.LDAPRPCRequester - _do_ntlm_auth : Invalid Credentials HOT 3
- get-adserviceaccount command doesn't exist (get-netgmsa is what enumerates gMSA accounts) HOT 1
- "AttributeError: install_layout"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pywerview.