Skip to content

Ability to ignore POST / GET form?

Hey, is it possible to force ignoring POST / GET forms?
If not, can It be possible (addition to script engine like, form method ignore) ?

Comments

  • SvenSven www.GSA-Online.de
    edited November 7
    just use the following as it will ignore the forms.
    [...]
    modify url=http://www.xyz.com
    post data=var1=content1&var2=... << optional
    just download=1</pre>
  • I don't want to ignore these forms, I want to use SER matching and form parsing, the thing is that sometimes the forms are very similiar and so SER is filling a GET form when it shouldn't
  • SvenSven www.GSA-Online.de
    well, you need to specify the form url/form name/form id properly then to make SER find the proper form.
  • Sven said:
    well, you need to specify the form url/form name/form id properly then to make SER find the proper form.
    Yes I know :smile: 
    But I cannot specify the form method like 
    form method=POST
    ; or
    form method ignore=GET


  • SvenSven www.GSA-Online.de
    modify submit type=get << change it to GET
    modify submit type=post << change it to POST
    modify submit type=multipart/form-data << change to POST and also change the way it to use multipart encoding
    you can also use "modify submit type condition" to only do that if content is matching.
  • Sven said:
    modify submit type=get << change it to GET
    modify submit type=post << change it to POST
    modify submit type=multipart/form-data << change to POST and also change the way it to use multipart encoding
    you can also use "modify submit type condition" to only do that if content is matching.
    Ok but it's `modify` and not `match`.
    When a form has method=post its a POST.
    So imagine two similiar forms:

    <form>...
    <form method="post">

    I want to match `post`, I don't care about get so:
    form method=post
    or
    form method ignore=get

  • SvenSven www.GSA-Online.de
    ok so it's still about identifying the correct form and not change it's type.
    Can you give me a real life sample?
  • andrzejekandrzejek Polska
    edited November 8
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Forms with POST and GET Methods</title>
    </head>
    <body>
    
        <h1>Forms with Random Fields</h1>
    
        <!-- POST Form -->
        <h2>POST Form</h2>
        <form action="/submit-post" method="POST">
            <label for="name">Name:</label>
            <input type="text" id="name" name="name" required><br><br>
    
            <label for="email">Email:</label>
            <input type="email" id="email" name="email" required><br><br>
    
            <label for="age">Age:</label>
            <input type="number" id="age" name="age" min="18" max="100"><br><br>
    
            <label for="color">Favorite Color:</label>
            <select id="color" name="color">
                <option value="red">Red</option>
                <option value="blue">Blue</option>
                <option value="green">Green</option>
            </select><br><br>
    
            <label for="subscribe">Subscribe to Newsletter:</label>
            <input type="checkbox" id="subscribe" name="subscribe"><br><br>
    
            <button type="submit">Submit POST</button>
        </form>
    
        <hr>
    
        <!-- GET Form Default -->
        <h2>GET Form</h2>
        <form action="/submit-get">
            <label for="name">Name:</label>
            <input type="text" id="name" name="name" required><br><br>
    
            <label for="email">Email:</label>
            <input type="email" id="email" name="email" required><br><br>
    
            <label for="age">Age:</label>
            <input type="number" id="age" name="age" min="18" max="100"><br><br>
    
            <label for="color">Favorite Color:</label>
            <select id="color" name="color">
                <option value="red">Red</option>
                <option value="blue">Blue</option>
                <option value="green">Green</option>
            </select><br><br>
    
            <label for="subscribe">Subscribe to Newsletter:</label>
            <input type="checkbox" id="subscribe" name="subscribe"><br><br>
    
            <button type="submit">Submit GET</button>
        </form>
    
        <!-- GET Form Explicit -->
        <h2>GET Form</h2>
        <form action="/submit-get" method="GET">
            <label for="name">Name:</label>
            <input type="text" id="name" name="name" required><br><br>
    
            <label for="email">Email:</label>
            <input type="email" id="email" name="email" required><br><br>
    
            <label for="age">Age:</label>
            <input type="number" id="age" name="age" min="18" max="100"><br><br>
    
            <label for="color">Favorite Color:</label>
            <select id="color" name="color">
                <option value="red">Red</option>
                <option value="blue">Blue</option>
                <option value="green">Green</option>
            </select><br><br>
    
            <label for="subscribe">Subscribe to Newsletter:</label>
            <input type="checkbox" id="subscribe" name="subscribe"><br><br>
    
            <button type="submit">Submit GET</button>
        </form>

  • SvenSven www.GSA-Online.de
    In that case you simply use the modify submit type instruction and ignore what it has detected ;)

  • Sven said:
    In that case you simply use the modify submit type instruction and ignore what it has detected ;)

    Yes, "maybe" it will work but it is not a solution. What if the wrong url action is chosen? The forms can be completely different, the safest is to ignore all GET... as the 1st task of a given STEP at the beginning, just let SER know "I am not interested in any GET form". 

    From my understanding modify submit type applies as the last step before the actual submission.
  • SvenSven www.GSA-Online.de
    I will add "form method=get|post" for next update.
  • Sven said:
    I will add "form method=get|post" for next update.
    Thank you, no way to get "ignore" ?
  • SvenSven www.GSA-Online.de
    no, as you get the same behaviour with that new command.
    Thanked by 1andrzejek
Sign In or Register to comment.