Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Regex to grab url

Code
[Wordlist]
UserIndex=1
PassIndex=2
EmailIndex=0
543835182C9E9FFF099CD106D4253D3A=100

[Settings]
SiteURL=http://asfile.com/en/login
SiteURL=https://asfile.com/en/login
SiteURL=http://www.asfile.com/en/login
SiteURL=https://www.asfile.com/en/login
Timeout=20
WaitBot=0
ResolveHost=0
ComboFilter=0
ComboMode=0
EmailFilter=0
EmailMode=0
UsernameStart=6
UsernameEnd=8
InvalidChars=
AllowedChars=
Letters=0
Digits=0
Alpha=0
Email=0
LowerUpper=0
LetterDigit=0
SpeciaChar=0
PasswordStart=6
PasswordEnd=8
PasswordInvalidChars=
PasswordAllowedChars=
PasswordLetters=0
PasswordDigits=0
PasswordAlpha=0
PasswordEmail=0
PasswordLowerUpper=0
PasswordLetterDigit=0
PasswordSpeciaChar=0
ProxyActivate=10
ProxyRatio=4
ProxyCombo=0
WaitTime=1
BanWindowWidth=1
BanWindowRatio=10
BanWindowProxies=10
blnNoProxies=1
HTTPHeader=<ACTION> <FORM ACTION> <HTTP VERSION>|Accept: */*|User-Agent: <USER AGENT>|Host: <HOST>|Pragma: no-cache|Connection: keep-alive|
RequestMethod=2
Referer=0
POSTData=login=<USER>&password=<PASS>&referer=

[Fake]
AfterFP=1
blnSuccess=0
SuccessRetries=3
blnProcessErrors=0
blnCompleteNot=1
EnableConHits=0
ConHits=0
FollowRedirect=1
EnableConLength=0
ConLength=-1
SourceTags=1
UserField=0
HTTPFollow=1
blnForbToOK=0
ForbToOkLength=1000
blnBadOcrCode=0
BadOcrCodeRetries=3

[Keywords]
EnableHeaderSuccess=0
EnableHeaderBan=0
EnableHeaderFail=0
EnableHeaderRetry=0
HeaderSuccess=
HeaderBan=
HeaderFail=
HeaderRetry=
EnableGlobalSourceRetry=1
EnableSourceSuccess=1
EnableSourceBan=0
EnableSourceFail=1
EnableSourceRetry=0
SourceSuccess=>Logout
SourceBan=
SourceFail=Fail login
SourceRetry=

[Form]
IAParse=0
LoginPostData=
LoginMethod=1
LoginHeader=0
Action=http://asfile.com/en/login
Username=login
Password=password
Email=
AddData=referer=
CustomData=
NoIndex=
Cookie=identity=f03982a8f9c847e9a23cb818912f7a51; symfony=0el04cmspgogapkkt6k26uo3b4
IAction=-1
IUser=-1
IPass=-1
IEmail=-2
ICaptcha=-1
ReqReferer=
ReqCookie=
AjaxURL=
AjaxPOSTData=
AjaxData=
AjaxParsingCode=
RefData=
ParsingCode=
FormRedirectUrl=
RedPostData=
RedKeys=
DataDesc=Cracked BY ***************** Team = Your account is&Valid to
CaptureParsingCode=s: |<|#00|#00|0|#00|#00|0&o: | |#00|#00|0|#00|#00|0
RefreshSession=0
RefreshCookie=0
FormHeader=0
AjaxHeader=0
RedHeader=0
IAMethod=2
POSTMethod=2
RedMethod=1
ImageAfterAjax=0
blnBasic=0
FollowRedirectsOnIA=0
FollowRedirectsOnRed=1

[Ajax]
Variables=
PostElements2=
RedURL=

[OCR]
OCRMode=0
URLMode=0
ImageURLID=||
Captcha=
OCRKey=
RefreshCaptcha=0
blnContrast=0
blnBrightness=0
blnSaturation=0
blnThreshold=0
blnInvert=0
blnNoise=0
blnIsolate=0
blnResize=0
blnBorder=0
blnCharExtract=0
blnRemoveColors=0
blnStringFilter=0
blnLetter=1
blnDigits=1
blnBlur=0
blnReconstruct=0
blnLower=0
blnUpper=0
blnRemoveLines=0
blnMultiChar=0
blnCharTable=0
blnPalette=0
blnCharResize=0
blnCharSubExtraction=0
blnThreeImages=0
blnGif=0
blnCompute=0
blnBorderPre=0
Contrast=0
Brightness=0
Saturation=0
Threshold=0
Noise=1
Isolate=1
Resize=2
BorderLeft=0
BorderTop=0
BorderRight=0
BorderBottom=0
CharExtractMinBlack=0
CharExtractMaxBlack=1
CharExtractMinWidth=1
CharRotateMax=0
CharRotateSteps=5
MinLength=1
MaxLength=10
BlurRadius=1
CharExtractMaxWidth=33
CharWidthMinBlack=2
CharSpace=1
Range=0
InvertDensity=0
InvertLength=20
LineCurvatureMax=4
LineWidthMax=13
CharResize=1
CharHeight=13
GifStart=2
GifOffset=2
BorderLeftPre=0
BorderTopPre=0
BorderRightPre=0
BorderBottomPre=0
CharBorderH=5
CharBorderV=5
CharRotateBorder=5
CharExtractMinHeight=1
VerticalRejoin=30
CharExclude=
SpecialChars=
Colors=
Colors2=
Lines=Min Length: 2, Max Width: 5, Horizzontal
Language=eng

The above config having the few of the following lines.
SiteURL=http://asfile.com/en/login
SiteURL=https://asfile.com/en/login
SiteURL=http://www.asfile.com/en/login
SiteURL=https://www.asfile.com/en/login


Url may be any type of the above 4 links, i want to grab asfile.com from the entire text...Thanks
Note:.com also varies sometimes like .net or .in etc...

Thanks a lot..
Since you specifically want to do this with regex and not string manipulation here - https://msdn.microsoft.com/en-us/library...10%29.aspx

Examples are below.
If this is yours, it would be way easier to serialize instead. There are probably flaws in this pattern but try:
Code
SiteURL=http(s)?:////(w{3}.)?asfile.(\w+\.?)+//.*

I guess another alternative is look for lines starting with "SiteURL" and containing "asfile".
(Sep 19, 2015 06:24 AM)Odus Wrote:  If this is yours, it would be way easier to serialize instead. There are probably flaws in this pattern but try:
Code
SiteURL=http(s)?:////(w{3}.)?asfile.(\w+\.?)+//.*

I guess another alternative is look for lines starting with "SiteURL" and containing "asfile".

asfile also changes every time..
(Sep 19, 2015 06:27 AM)dark.team Wrote:  asfile also changes every time..

But...

(Sep 19, 2015 06:04 AM)dark.team Wrote:  i want to grab asfile.com from the entire text

❓
I have bunch of text like that and always the asfile.com change to some other url like google.com etc...Please help me with regex.
I think the OP wants to retrieve this part:
SiteURL=http://asfile.com/en/login
SiteURL=https://asfile.com/en/login
SiteURL=http://www.asfile.com/en/login
SiteURL=https://www.asfile.com/en/login

So everything behind the SiteURL={REGEX}
(Sep 19, 2015 07:05 AM)Sarcastic Desires Wrote:  I think the OP wants to retrieve this part:
SiteURL=http://asfile.com/en/login
SiteURL=https://asfile.com/en/login
SiteURL=http://www.asfile.com/en/login
SiteURL=https://www.asfile.com/en/login

So everything behind the SiteURL={REGEX}

Yes you are right i want to grab text which is present after SiteURL=

I will be more happy if i able to grab only site.com also.

Thanks
The entire url:
Code
SiteURL=([^\n]*)

just site.com:
Code
SiteURL=(?:http(?:s|):\/\/(?:www.|)([^\/]*))
[Image: IQE6i8G.png]

BlackCap Wrote:You're even more verbose than Java.
About using GoTo's in VB/C#:
Only3 Wrote:asm use it why u shouldnt


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by zograJun 18, 2021 09:13 AM 4 130 Jun 18, 2021 09:13 AM
Last Post: zogra
[C#] by Bruce BannerOct 8, 2019 03:38 PM 5 436 Oct 8, 2019 03:38 PM
Last Post: Bruce Banner
[C#] by ShadyxJul 23, 2017 10:31 AM 12 444 Jul 23, 2017 10:31 AM
Last Post: SL x TnT