{"id":18689675,"url":"https://github.com/mrseanryan/xpatho","last_synced_at":"2025-11-08T07:30:29.591Z","repository":{"id":96810149,"uuid":"471365381","full_name":"mrseanryan/xpatho","owner":"mrseanryan","description":":negative_squared_cross_mark: Obfuscate XPath expressions (replacing any IP sensitive parts)","archived":false,"fork":false,"pushed_at":"2022-04-11T15:41:28.000Z","size":25,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-28T01:49:20.451Z","etag":null,"topics":["obfuscate","obfuscation","obfuscator","xpath"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrseanryan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-18T12:48:28.000Z","updated_at":"2022-03-18T12:49:55.000Z","dependencies_parsed_at":"2023-04-11T15:32:49.223Z","dependency_job_id":null,"html_url":"https://github.com/mrseanryan/xpatho","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrseanryan%2Fxpatho","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrseanryan%2Fxpatho/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrseanryan%2Fxpatho/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrseanryan%2Fxpatho/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrseanryan","download_url":"https://codeload.github.com/mrseanryan/xpatho/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239550286,"owners_count":19657541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["obfuscate","obfuscation","obfuscator","xpath"],"created_at":"2024-11-07T10:44:34.801Z","updated_at":"2025-11-08T07:30:29.560Z","avatar_url":"https://github.com/mrseanryan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XPathO README :negative_squared_cross_mark:\r\n\r\nA command line tool to obfuscate XPath expressions (replacing any IP sensitive parts)\r\n\r\n# how to use\r\n\r\n## use - reading a plain text file with 1 XPath per line\r\n\r\nSee the built-in help:\r\n\r\n```\r\npython xpatho.py [text file]\r\n```\r\n\r\n```\r\nUsage: xpatho.py \u003cpath to text file containing XPath expressions\u003e [options]\r\n\r\nThe options are:\r\n[-e --empty (Do not omit empty XPaths)]\r\n[-h --help]\r\n[-u --unique (Omit duplicates)]\r\n\r\nExamples: [Windows]\r\nxpatho.py testData\\xpaths_1.txt -u\r\nxpatho.py \\data\\xpaths_1.txt -u -e\r\n\r\nExamples: [Unix/Mac]\r\nxpatho.py ./testData/xpaths_1.txt -u\r\nxpatho.py /data/xpaths_1.txt -u -e\r\n```\r\n\r\n## examples\r\n\r\n| Description | Input | Obfuscated Output |\r\n|---|---|---|\r\n| XPath with keywords 1 | `[red and bright]` | `[token_10001 and token_10000]` |\r\n| XPath with keywords 2 | `[red or bright]` | `[token_10001 or token_10000]` |\r\n| Complex XPath 1 | `[Part1.StatusPart2Part3_Status/Part4.Status/StatusCode = 'X1']` | `[token_10000.token_10004/token_10001.token_10002/token_10003 = 'X1']` |\r\n\r\n## notes\r\n\r\n- by default, empty XPaths are omitted. See the options for how to override this.\r\n- very short tokens (less than 3 letters) are not obfuscated\r\n\r\n# use - reading a CSV file where 1 column has XPaths that need to be obfuscated\r\n\r\nSee the built-in help:\r\n\r\n```\r\npython xpatho_csv.py [CSV file]\r\n```\r\n\r\n```\r\nUsage: xpatho_csv.py \u003cpath to CSV file containing XPath expressions\u003e \u003cpath to output CSV file\u003e [options]\r\n\r\nThe options are:\r\n[-c --csv_column (If reading a CSV file, specifies which column to read, using a 0-based index)]\r\n[-d --csv_delimiter (If reading a CSV file, specifies the field delimiter)]\r\n[-h --help]\r\n[-o --csv_output_delimiter (The column/field delimiter to use in the output CSV file)]\r\n[-v --verbose (Verbose output to help debug)]\r\n\r\nExamples: [Windows]\r\nxpatho_csv.py testData\\\\xpaths_1.csv temp\\\\xpaths_1.obfuscated.csv -csv_column 1\r\nxpatho_csv.py \\\\data\\\\xpaths_2.csv temp\\\\xpaths_2.obfuscated.csv -csv_column 1\r\n\r\nExamples: [Unix/Mac]\r\nxpatho_csv.py ./testData/xpaths_1.csv temp/xpaths_1.obfuscated.csv -csv_column 1\r\nxpatho_csv.py /data/xpaths_2.csv temp/xpaths_2.obfuscated.csv -csv_column 1\r\n```\r\n\r\n## notes\r\n\r\n- very short tokens (less than 3 letters) are not obfuscated\r\n\r\n# use - reading a JSON file where a hard-coded path has XPaths that need to be obfuscated\r\n\r\nSee the built-in help:\r\n\r\n```\r\npython xpatho_json.py [JSON file]\r\n```\r\n\r\n```\r\nUsage: xpatho_json.py \u003cpath to JSON file containing XPath expressions\u003e [options]\r\n\r\nThe options are:\r\n[-h --help]\r\n\r\nExamples: [Windows]\r\nxpatho_csv.py testData\\\\xpaths_1.json\r\nxpatho_csv.py \\\\data\\\\xpaths_2.json\r\n\r\nExamples: [Unix/Mac]\r\nxpatho_csv.py ./testData/xpaths_1.json\r\nxpatho_csv.py /data/xpaths_2.json\r\n```\r\n\r\n## notes\r\n\r\n- the path to the location inside the JSON file is hard-coded! So you may need to tweak the Python code, depending on your needs!\r\n- very short tokens (less than 3 letters) are not obfuscated\r\n\r\n# setup\r\n\r\n1. Install Python 3.7.x and pip\r\n\r\n- Python 3.7.9 or later\r\n- pip 21.3.1 or later\r\n\r\n2. Install dependencies\r\n\r\n```\r\npip install -r pip.config\r\n```\r\n\r\n# libraries used\r\n\r\nxpatho uses a few nice libraries:\r\n\r\n| Library       | URL                                             | Description                                              |\r\n| ------------- | ----------------------------------------------- | -------------------------------------------------------- |\r\n| parameterized | https://pypi.org/project/parameterized/         | Easily parameterize your unit tests                      |\r\n\r\n# tools used\r\n\r\n| Tool | URL                           | Description                                                                                                               |\r\n| ---- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------- |\r\n| pip  | https://pypi.org/project/pip/ | pip used with a config file, makes it easy to restore a Python project on another machine (even between Windows and Mac!) |\r\n\r\n# license\r\n\r\nLicense is [MIT](./LICENSE)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrseanryan%2Fxpatho","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrseanryan%2Fxpatho","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrseanryan%2Fxpatho/lists"}