mdelatorre

File in Find with AutoIt

Dec 7th, 2024
14,582
0
Never
13
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 2.71 KB | Source Code | 0 0
  1. ; #FUNCTION# ====================================================================================================================
  2. ; Name ..........: _FindInFile
  3. ; Description ...: Search for a string within files located in a specific directory.
  4. ; Syntax ........: _FindInFile($sSearch, $sFilePath[, $sMask = '*'[, $fRecursive = True[, $fLiteral = Default[,
  5. ;                  $fCaseSensitive = Default[, $fDetail = Default]]]]])
  6. ; Parameters ....: $sSearch             - The keyword to search for.
  7. ;                  $sFilePath           - The folder location of where to search.
  8. ;                  $sMask               - [optional] A list of filetype extensions separated with ';' e.g. '*.au3;*.txt'. Default is all files.
  9. ;                  $fRecursive          - [optional] Search within subfolders. Default is True.
  10. ;                  $fLiteral            - [optional] Use the string as a literal search string. Default is False.
  11. ;                  $fCaseSensitive      - [optional] Use Search is case-sensitive searching. Default is False.
  12. ;                  $fDetail             - [optional] Show filenames only. Default is False.
  13. ; Return values .: Success - Returns a one-dimensional and is made up as follows:
  14. ;                            $aArray[0] = Number of rows
  15. ;                            $aArray[1] = 1st file
  16. ;                            $aArray[n] = nth file
  17. ;                  Failure - Returns an empty array and sets @error to non-zero
  18. ; Author ........: guinness
  19. ; Remarks .......: For more details: http://ss64.com/nt/findstr.html
  20. ; Example .......: Yes
  21. ; ===============================================================================================================================
  22. Func _FindInFile($sSearch, $sFilePath, $sMask = '*', $fRecursive = True, $fLiteral = Default, $fCaseSensitive = Default, $fDetail = Default)
  23.     Local $sCaseSensitive = $fCaseSensitive ? '' : '/i', $sDetail = $fDetail ? '/n' : '/m', $sRecursive = ($fRecursive Or $fRecursive = Default) ? '/s' : ''
  24.     If $fLiteral Then
  25.         $sSearch = ' /c:' & $sSearch
  26.     EndIf
  27.     If $sMask = Default Then
  28.         $sMask = '*'
  29.     EndIf
  30.  
  31.     $sFilePath = StringRegExpReplace($sFilePath, '[\\/]+$', '') & '\'
  32.     Local Const $aMask = StringSplit($sMask, ';')
  33.     Local $iPID = 0, $sOutput = ''
  34.     For $i = 1 To $aMask[0]
  35.         $iPID = Run(@ComSpec & ' /c ' & 'findstr ' & $sCaseSensitive & ' ' & $sDetail & ' ' & $sRecursive & ' "' & $sSearch & '" "' & $sFilePath & $aMask[$i] & '"', @SystemDir, @SW_HIDE, $STDOUT_CHILD)
  36.         ProcessWaitClose($iPID)
  37.         $sOutput &= StdoutRead($iPID)
  38.     Next
  39.     Return StringSplit(StringStripWS(StringStripCR($sOutput), BitOR($STR_STRIPLEADING, $STR_STRIPTRAILING)), @LF)
  40. EndFunc   ;==>_FindInFile
Tags: AutoIT
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
    • mdelatorre
      90 days
      # text 0.16 KB | 0 0
      1. Absolutely false. The pastes in this account are code snipplets that I have found useful. And when available the proper credit is given. In this case to user guinness.
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Ulrrevor
    72 days
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
  • Vinboutov
    65 days
    # CSS 0.06 KB | 0 0
    1. We just shared HQ data on our channel: https://t.me/theprotocolone
Add Comment
Please, Sign In to add comment