Author Archives: pankajsheoran

Remove trailing space from all line of a file using powershell

We can use following script to remove space at the end of each line in a file with the help of powershell script. $InputFile = ‘C:\Users\user\Desktop\1.txt’ write-host “removing trailing space.. of file $InputFile” $content = Get-Content $InputFile $content | Foreach {$_.TrimEnd()} … Continue reading

Posted in Other | Leave a comment

Python script to print all hyper links on a URL

We can use this script to find all hyper links on a web page. This script can be used in reconnaissance. import urllib2 import re import sys #connect to a URL url= str(sys.argv[1]) website = urllib2.urlopen(url) #read html code html … Continue reading

Posted in Python | Leave a comment


There are lot of tool to perform reconnaissance: nmap arping arping: This command send arp request packet to a host and if a reply comes then we can say that that host is alive. This command can be useful to … Continue reading

Posted in OSCP | Leave a comment

How to resolve in Linux

While running commands with the help of sudo if you are getting following error the you have to add that user to sudo group : is not in the sudoers file. This incident will be reported adduser <username> sudo  

Posted in Linux | Leave a comment

Understanding commands

Cut command: cut -d : -f1,2 /etc/passwd delimiter is specified by -d option and in this command the delimiter is : -f option specifies to print 1,2 match cd command: cd command is used to change the directory. “.” represents … Continue reading

Posted in Linux | Leave a comment

Protected: Attacks

There is no excerpt because this is a protected post.

Posted in Other

Powershell Script to ping IPs in a file

This post explains how to ping all IP kept in a file. The following script find IP from a string and then ping to that IP. For example if you have a string as “srx-fw-hk-03 (” it will remove … Continue reading

Posted in Powershell | Tagged , | Leave a comment