Thread: Extract string

Results 1 to 9 of 9
  1. #1
    Mayion's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Location
    Bed
    Posts
    13,504
    Reputation
    4018
    Thanks
    8,372
    My Mood
    Twisted

    Extract string

    Hi,
    Is there a way to extract 'unknown' text/string from a webpage?
    HTML Code:
    Code:
    <input type="text" value="The value randomly generates.">
    I want to extract that random string to my textbox.
    This Text input in the webpage has no ID/Tagname so I can't find a way to get its innerText.
    Any help is appreciated
    I do not use any type of messenger outside of MPGH.
    Inactive but you can reach me through VM/PM.










     

    Donator - 30 August 2013
    Battlefield Minion - 26 October 2013

    Blackshot Minion - 14 January 2014/16 September 2014
    Minecraft Minion - 7 February 2014/16 September 2014
    WarRock Minion - 23 February 2014
    League of Legends Minion - 21 March 2014

    Minion+ - 15 May 2014
    Other Semi-Popular First Person Shooter Minion - 8 August 2014
    CrossFire Minion - 23 October 2014
    Programming Section Minion - 13 November 2014
    Marketplace Minion - 7 December 2014

    Official Middleman - 7 December 2014 - 27 June 2015
    Moderator - 29 December 2014
    Project Blackout Minion - 10 January 2015
    News Force Interviewer - January 2015
    Steam Games Minion - 21 March 2015
    Dragon Nest Minion - 31 March 2015
    Publicist - April 2015 - 21 September 2015
    Global Moderator - 25 August 2015
    Super User - 13 August 2016



  2. #2
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    you can narrow it down by selecting only the <form>...</form> text. How many <form>'s are on the page?

    Once you have a variable containing just the <form> string, how many <input> elements does it have? and how many <input> elements does it have that only have 'type' and 'value' set?
    'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

  3. #3
    Mayion's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Location
    Bed
    Posts
    13,504
    Reputation
    4018
    Thanks
    8,372
    My Mood
    Twisted
    Quote Originally Posted by abuckau907 View Post
    you can narrow it down by selecting only the <form>...</form> text. How many <form>'s are on the page?

    Once you have a variable containing just the <form> string, how many <input> elements does it have? and how many <input> elements does it have that only have 'type' and 'value' set?
    Only two with the "<input type="text"" thing, however, one of them has Name and ID.
    I do not use any type of messenger outside of MPGH.
    Inactive but you can reach me through VM/PM.










     

    Donator - 30 August 2013
    Battlefield Minion - 26 October 2013

    Blackshot Minion - 14 January 2014/16 September 2014
    Minecraft Minion - 7 February 2014/16 September 2014
    WarRock Minion - 23 February 2014
    League of Legends Minion - 21 March 2014

    Minion+ - 15 May 2014
    Other Semi-Popular First Person Shooter Minion - 8 August 2014
    CrossFire Minion - 23 October 2014
    Programming Section Minion - 13 November 2014
    Marketplace Minion - 7 December 2014

    Official Middleman - 7 December 2014 - 27 June 2015
    Moderator - 29 December 2014
    Project Blackout Minion - 10 January 2015
    News Force Interviewer - January 2015
    Steam Games Minion - 21 March 2015
    Dragon Nest Minion - 31 March 2015
    Publicist - April 2015 - 21 September 2015
    Global Moderator - 25 August 2015
    Super User - 13 August 2016



  4. #4
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    perfect, so

    1. pull out the text from "<form >" to "</form">
    2. pull out each <input type="text"..>
    3. check if <> tag contains the words Name or ID and you'll know if it's the correct one ?
    'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

  5. The Following User Says Thank You to abuckau907 For This Useful Post:

    [MPGH]Mayion (08-30-2014)

  6. #5
    Mayion's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Location
    Bed
    Posts
    13,504
    Reputation
    4018
    Thanks
    8,372
    My Mood
    Twisted
    Quote Originally Posted by abuckau907 View Post
    perfect, so

    1. pull out the text from "<form >" to "</form">
    2. pull out each <input type="text"..>
    3. check if <> tag contains the words Name or ID and you'll know if it's the correct one ?
    Well, the question now is, how to pull out "<input type="text" value="The value randomly generates.">" from the webpage source?
    I do not use any type of messenger outside of MPGH.
    Inactive but you can reach me through VM/PM.










     

    Donator - 30 August 2013
    Battlefield Minion - 26 October 2013

    Blackshot Minion - 14 January 2014/16 September 2014
    Minecraft Minion - 7 February 2014/16 September 2014
    WarRock Minion - 23 February 2014
    League of Legends Minion - 21 March 2014

    Minion+ - 15 May 2014
    Other Semi-Popular First Person Shooter Minion - 8 August 2014
    CrossFire Minion - 23 October 2014
    Programming Section Minion - 13 November 2014
    Marketplace Minion - 7 December 2014

    Official Middleman - 7 December 2014 - 27 June 2015
    Moderator - 29 December 2014
    Project Blackout Minion - 10 January 2015
    News Force Interviewer - January 2015
    Steam Games Minion - 21 March 2015
    Dragon Nest Minion - 31 March 2015
    Publicist - April 2015 - 21 September 2015
    Global Moderator - 25 August 2015
    Super User - 13 August 2016



  7. #6
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    String.IndexOf() and String.SubString() ?

    ex. To separate "myemail@myprovider.com" into 'email_name' and 'provide_namer' (hint: separated by the @ character)

    You'd find the Index of the "@" character, using .IndexOf(), and copy the string, using .SubString() - from its first character up until the @ character. To get the 'provider' part of the string you'd .SubString() starting at the @ character's index + 1 and go to the last character (in this example).
    Last edited by abuckau907; 08-30-2014 at 05:20 AM.
    'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

  8. The Following User Says Thank You to abuckau907 For This Useful Post:

    [MPGH]Mayion (08-30-2014)

  9. #7
    Mayion's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Location
    Bed
    Posts
    13,504
    Reputation
    4018
    Thanks
    8,372
    My Mood
    Twisted
    Quote Originally Posted by abuckau907 View Post
    String.IndexOf() and String.SubString() ?
    I can't find it anywhere, I never used the extract thing before.
    Mind helping me with the code?
    I do not use any type of messenger outside of MPGH.
    Inactive but you can reach me through VM/PM.










     

    Donator - 30 August 2013
    Battlefield Minion - 26 October 2013

    Blackshot Minion - 14 January 2014/16 September 2014
    Minecraft Minion - 7 February 2014/16 September 2014
    WarRock Minion - 23 February 2014
    League of Legends Minion - 21 March 2014

    Minion+ - 15 May 2014
    Other Semi-Popular First Person Shooter Minion - 8 August 2014
    CrossFire Minion - 23 October 2014
    Programming Section Minion - 13 November 2014
    Marketplace Minion - 7 December 2014

    Official Middleman - 7 December 2014 - 27 June 2015
    Moderator - 29 December 2014
    Project Blackout Minion - 10 January 2015
    News Force Interviewer - January 2015
    Steam Games Minion - 21 March 2015
    Dragon Nest Minion - 31 March 2015
    Publicist - April 2015 - 21 September 2015
    Global Moderator - 25 August 2015
    Super User - 13 August 2016



  10. #8
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    Read a few tutorial on "string manipulation vb.net" ..at least see a few examples of the functions being used and then come back if you have a question about your specific problem; I'm not teaching you how to use the functions, there are already well written tutorials out there; sorry, I don't have a link.

    Most books would probably cover this in a section explaining "Strings". Do you have access to a book? Surely there are some free on the internet?
    Last edited by abuckau907; 08-30-2014 at 05:59 AM.
    'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

  11. The Following User Says Thank You to abuckau907 For This Useful Post:

    [MPGH]Mayion (08-30-2014)

  12. #9
    Mayion's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Location
    Bed
    Posts
    13,504
    Reputation
    4018
    Thanks
    8,372
    My Mood
    Twisted
    Quote Originally Posted by abuckau907 View Post
    Read a few tutorial on "string manipulation vb.net" ..at least see a few examples of the functions being used and then come back if you have a question about your specific problem; I'm not teaching you how to use the functions, there are already well written tutorials out there.
    Can't find any tutorials, I don't know why and how. lol
    Edit: @abuckau907 Used Regex & Regex.match and worked as I wanted, Thanks for the help.
    Last edited by Mayion; 08-30-2014 at 09:54 AM.
    I do not use any type of messenger outside of MPGH.
    Inactive but you can reach me through VM/PM.










     

    Donator - 30 August 2013
    Battlefield Minion - 26 October 2013

    Blackshot Minion - 14 January 2014/16 September 2014
    Minecraft Minion - 7 February 2014/16 September 2014
    WarRock Minion - 23 February 2014
    League of Legends Minion - 21 March 2014

    Minion+ - 15 May 2014
    Other Semi-Popular First Person Shooter Minion - 8 August 2014
    CrossFire Minion - 23 October 2014
    Programming Section Minion - 13 November 2014
    Marketplace Minion - 7 December 2014

    Official Middleman - 7 December 2014 - 27 June 2015
    Moderator - 29 December 2014
    Project Blackout Minion - 10 January 2015
    News Force Interviewer - January 2015
    Steam Games Minion - 21 March 2015
    Dragon Nest Minion - 31 March 2015
    Publicist - April 2015 - 21 September 2015
    Global Moderator - 25 August 2015
    Super User - 13 August 2016



Similar Threads

  1. All Strings ?
    By Teh Sasuke in forum Visual Basic Programming
    Replies: 2
    Last Post: 01-05-2008, 01:37 PM
  2. Delphi 7 for replacing detected CE strings??
    By jokuvaan11 in forum WarRock - International Hacks
    Replies: 5
    Last Post: 07-02-2007, 03:34 AM
  3. (Request) A tutorial on how to extract addresses from trainers
    By englishpom in forum WarRock - International Hacks
    Replies: 9
    Last Post: 05-19-2007, 10:14 PM
  4. String Theory
    By arunforce in forum General
    Replies: 8
    Last Post: 01-14-2007, 09:49 AM
  5. Self Extracting Trainer By OMGWTF
    By OMGWTF in forum WarRock - International Hacks
    Replies: 20
    Last Post: 02-22-2006, 07:39 AM