programming4us
programming4us
WEBSITE

Web Security Testing : Automating Specific Tasks with cURL - Fetching Many Variations on a URL

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

Problem

There are often times when we want to fetch a variety of URLs that vary in only a small way. For example, you might want to fetch variations on a product page by varying the PRODUCTID parameter. You might need to fetch a variety of URLs that vary in a small part (e.g., news, careers, blog). cURL makes this all easy by not only allowing you to specify variations in a concise format, but also letting you name the corresponding output file according to the variation you specified.

Solution

# Fetch all the categories from 00 to 99.curl -o 'category-#1#2.html' 'http://www.example.com/category.php?CATID=[0-9][0-9]'curl -o 'category-#1.html' 'http://www.example.com/category.php?CATID=[0-99]'# Fetch several main pages and store them in files named accordinglycurl -o '#1.html' 'http://www.example.com/{news,blog,careers,contact,sitemap}/'

Discussion

Note the use of single quotes. In a Unix environment, that’s necessary to avoid problems where the shell interprets the #, ?, and brackets. In Windows, that’s less necessary, but it doesn’t hurt. The first example fetches pages where CATID must be exactly 2 digits, i.e., 00, 01, 02, ..., 97, 98, 99. The second example fetches the same sorts of pages, but where CATID is a single digit for values 0–9 and double digits thereafter, i.e., 0, 1, 2, ..., 97, 98, 99.

You can put many varying parameters into a single command. cURL will do all the permutations and combinations. Consider an item page that takes a product ID (0001–9999), a category (0–9), a color (red, yellow, blue, or green) and a size (S, M, L, or XL). The following single invocation of cURL will fetch every possible combination (all 1,599,840 of them!).

curl -o '#1-#2-#3-#4.html' \"http://www.example.com/cgi-bin/item.cgi?prod=[0001-9999]    &cat=[0-9]&color={red,yellow,blue,green}&size={s,m,l,xl}"

Of course, in security testing, we would test for weird values: alphabetic product IDs, numeric sizes, and interesting boundary cases like 65,537 for color.

Other  
  •  Web Security Testing : Automating Specific Tasks with cURL - Fetching a Page with cURL
  •  Sharepoint 2013 : SharePoint Publishing Infrastructure (part 6) - Check In/Out, Versioning, and Content Approval
  •  Sharepoint 2013 : SharePoint Publishing Infrastructure (part 5) - Content Management - Putting It All Together
  •  Sharepoint 2013 : SharePoint Publishing Infrastructure (part 4) - Content Management - Master Pages,Page Layouts
  •  Sharepoint 2013 : SharePoint Publishing Infrastructure (part 3) - Content Management - Site Columns, Content Types
  •  Sharepoint 2013 : SharePoint Publishing Infrastructure (part 2) - Publishing Features
  •  Sharepoint 2013 : SharePoint Publishing Infrastructure (part 1) - A Publishing Site
  •  Show the whole car kingdom “What’ll you do?”, Porsche (Part 1)
  •  Sharepoint 2013 : List and library essentials - Organizing items by using folders
  •  Sharepoint 2013 : List and library essentials - Sorting or filtering a list view
  •  
    Top 10
    Free Mobile And Desktop Apps For Accessing Restricted Websites
    MASERATI QUATTROPORTE; DIESEL : Lure of Italian limos
    TOYOTA CAMRY 2; 2.5 : Camry now more comely
    KIA SORENTO 2.2CRDi : Fuel-sipping slugger
    How To Setup, Password Protect & Encrypt Wireless Internet Connection
    Emulate And Run iPad Apps On Windows, Mac OS X & Linux With iPadian
    Backup & Restore Game Progress From Any Game With SaveGameProgress
    Generate A Facebook Timeline Cover Using A Free App
    New App for Women ‘Remix’ Offers Fashion Advice & Style Tips
    SG50 Ferrari F12berlinetta : Prancing Horse for Lion City's 50th
    - Messages forwarded by Outlook rule go nowhere
    - Create and Deploy Windows 7 Image
    - How do I check to see if my exchange 2003 is an open relay? (not using a open relay tester tool online, but on the console)
    - Creating and using an unencrypted cookie in ASP.NET
    - Directories
    - Poor Performance on Sharepoint 2010 Server
    - SBS 2008 ~ The e-mail alias already exists...
    - Public to Private IP - DNS Changes
    - Send Email from Winform application
    - How to create a .mdb file from ms sql server database.......
    programming4us programming4us
    programming4us
     
     
    programming4us