Thursday, October 25, 2018

Penetration testing - My References

Cross site scripting (XSS):

References:
  • Level 1 - https://www.exploit-db.com/papers/13646/
  • Level 2 and for Stored XSS - 


For practice:

  • https://xss-game.appspot.com/level2
    • Answers: http://blog.dornea.nu/2014/06/02/googles-xss-game-solutions/

Tuesday, April 17, 2018

Generate Robot framerwork keyword documentation from custom library?

Let say, I've created my own python library for robot framework and now I want to generate documentation from the python class file.

How to do it?

Step 1:
In python, add your documentation

def delete_excel_row(self, varFileName, varSheetName, varCellName):
"""
Delete a row in the excel file.
Arguments:
| FileName | Excel file with full path |
| SheetName | Sheetname in the excel file |
| CellValue | Row to be deleted in the sheet |

Example:
Delete row
| Delete Excel Row | C:\\Python27\\ExcelRobotTest\\ExcelRobotTest.xlsx | Sheet1 | A1 |
"""
self.varFileName = varFileName
self.varSheetName = varSheetName
self.varCellName = varCellName
varExcel = win32com.client.DispatchEx('Excel.Application')
varWB = varExcel.Workbooks.Open(self.varFileName)
varSheet = varWB.Sheets(self.varSheetName)
varSheet.Range(self.varCellName).EntireRow.Delete(Shift=-4162)
varWB.Save()
varWB.Close()
varExcel.Quit()

Step 2:
Now generate documentation using command

 python -m robot.libdoc filename.py  filename.html