-
Jul 4th, 2018, 07:09 AM
#1
Thread Starter
Addicted Member
Is there a library that validates strings
Hi, is there a library that checks against the types I stated above? It doesn't matter if it's C# C++ another library. These are data types used by a download manager / bittorrent client.
ADDR |
INTERFACE |
METALINK_FILE |
PID |
SIZE |
VALUE |
COMMAND |
INTERFACES |
METHOD |
POLL |
TAG |
VERSION |
DIGEST |
IPADDRESS |
METHOD |
PORT |
TOKEN |
[=SIZE],tail[=SIZE] |
DIR |
IPADDRESS[,...] |
MINUTES |
PORT... |
TORRENT_FILE |
[true|false] |
DSCP |
KEYWORD |
N |
PROTO |
TYPE |
[true|false|A:B] |
FILE |
LANGUAGE |
NUM |
PROXY |
TYPE |
plain|arc4 |
GID |
LENGTH |
OPT |
RATIO |
URI |
true|false |
HEADER |
LEVEL |
OS |
REFERER |
URI[,...] |
true|false|mem |
HOST:PORT |
LOCATION[,...] |
PEER_AGENT |
SEC |
USER |
* |
INDEX... |
LOG |
PEER_ID_PREFIX |
SELECTOR |
USER_AGENT |
* |
EDIT: What I need is ex. if I want to validate against IPADDRESS these must return true;
Code:
string: 233.93.15.1 - returns true
string: 353.93.15.1 - returns true
string: 15.25 - returns false
if I want it to validate DIR this must happen.
Code:
string: C:\Program Files\7-Zip\ - returns true
string: D:\music\michael_jackson\ - returns true
string: D/mp3 - returns false
Last edited by nikel; Jul 4th, 2018 at 11:28 AM.
Reason: I added more info
I'm not a man of too many faces
The mask I wear is one
-
Jul 4th, 2018, 10:00 AM
#2
Re: Is there a library that validates strings
I don't really understand the question. What "types"? Are you saying that you want to find one of those values in some text? Try providing a FULL and CLEAR explanation of the problem.
-
Jul 4th, 2018, 11:24 AM
#3
Thread Starter
Addicted Member
Re: Is there a library that validates strings
I'm not a man of too many faces
The mask I wear is one
-
Jul 4th, 2018, 11:45 AM
#4
Re: Is there a library that validates strings
Are you sure of that, string: 353.93.15.1 - returns true certainly isn't doing what I expect as that most definitely isn't a valid IP address....
A lot of the other data types might need an explanation as well - exactly what is a GID or TOKEN supposed to look like?
Last edited by PlausiblyDamp; Jul 4th, 2018 at 11:49 AM.
-
Jul 4th, 2018, 12:23 PM
#5
Thread Starter
Addicted Member
Re: Is there a library that validates strings
Hi I don't know all of them yet but I pasted an example GID at https://gist.github.com/onurcan19772...9c375aa594618b
and some token:
Code:
e6c3778f-6361-4ed0-b126-f2cf8fca06db
I'm not a man of too many faces
The mask I wear is one
-
Jul 4th, 2018, 01:08 PM
#6
Re: Is there a library that validates strings
Originally Posted by nikel
If you are trying to work with .torrent files then a better understanding of the structure might be a starting point you might want to look at something like https://en.wikipedia.org/wiki/Torren...File_structure or http://www.bittorrent.org/beps/bep_0003.html
-
Jul 4th, 2018, 03:47 PM
#7
Thread Starter
Addicted Member
Re: Is there a library that validates strings
Wikipedia is banned in my country, I have general knowledge about torrenting, of course I'll need to learn more about it. Thanks for your reply.
I'm not a man of too many faces
The mask I wear is one
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|