-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample_usage.sh
More file actions
executable file
·57 lines (44 loc) · 3.02 KB
/
example_usage.sh
File metadata and controls
executable file
·57 lines (44 loc) · 3.02 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
# Example usage of dataRetreiver.py with UID filtering
echo "=== Example 1: Download all accounts ==="
echo "python3 dataRetreiver.py --host localhost --username user --password pass --database mydb"
echo ""
echo "=== Example 2: Download only specific accounts by numeric UID ==="
echo "python3 dataRetreiver.py --host localhost --username user --password pass --database mydb --uid-filter '1,5,10'"
echo ""
echo "=== Example 3: Download only specific accounts by string UID ==="
echo "python3 dataRetreiver.py --host localhost --username user --password pass --database mydb --uid-filter 'user1,admin,abc123'"
echo ""
echo "=== Example 4: Download UIDs with special characters (REQUIRES QUOTES) ==="
echo "python3 dataRetreiver.py --host localhost --username user --password pass --database mydb --uid-filter '\"user@domain.com\",\"admin.test\",\"user+tag@example.org\"'"
echo ""
echo "=== Example 5: Download mixed numeric and string UIDs ==="
echo "python3 dataRetreiver.py --host localhost --username user --password pass --database mydb --uid-filter '1,user2,admin,100'"
echo ""
echo "=== Example 6: Download UIDs with special characters using single quotes ==="
echo "python3 dataRetreiver.py --host localhost --username user --password pass --database mydb --uid-filter \"'user@domain.com','admin.test','user+tag@example.org'\""
echo ""
echo "=== Example 7: Download specific accounts with custom output file ==="
echo "python3 dataRetreiver.py --host localhost --username user --password pass --database mydb --uid-filter 'user1,user2,user3' --output filtered_accounts.csv"
echo ""
echo "=== Example 8: Download specific accounts with custom images directory ==="
echo "python3 dataRetreiver.py --host localhost --username user --password pass --database mydb --uid-filter 'admin,guest,test' --images-dir custom_images"
echo ""
echo "=== Example 9: Find users with expired passports (expired before 2023-01-01) ==="
echo "python3 dataRetreiver.py --host localhost --username user --password pass --database mydb --expired-before '2023-01-01'"
echo ""
echo "=== Example 10: Find expired passports with custom output file ==="
echo "python3 dataRetreiver.py --host localhost --username user --password pass --database mydb --expired-before '2022-12-31' --output expired_passports.csv"
echo ""
echo "=== Example 11: Find expired passports with custom images directory ==="
echo "python3 dataRetreiver.py --host localhost --username user --password pass --database mydb --expired-before '2023-06-01' --images-dir passport_images"
echo ""
echo "Note: Replace 'localhost', 'user', 'pass', and 'mydb' with your actual MySQL connection details"
echo ""
echo "IMPORTANT: UIDs with special characters (@, ., +, etc.) MUST be quoted!"
echo "IMPORTANT: Date format for --expired-before must be YYYY-MM-DD (e.g., '2023-01-01')"
echo "Examples of special characters that require quotes:"
echo " - Email addresses: user@domain.com"
echo " - Domain names: admin.test"
echo " - URLs: user+tag@example.org"
echo " - Any UID containing spaces, symbols, or special characters"