Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Bombsaway707's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    Gym
    Posts
    8,799
    Reputation
    791
    Thanks
    4,004
    My Mood
    Amused

    [Help]Wierd error message

    Ok so to simplify this and make it hopefully easy to answer, i need to send an email via a program to a certain email adress, i need to be able to change it remotely so on my server i have a .txt file which contains the email i want to send the email too. But when i run my program it says "this string is not a valid" or something. I checked to make sure it dl's the right text file and it does and the email sender works if u put in ur own location but it doesnt like using the external .txt file for some reason...
    any help?

  2. #2
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    Could we see the exact error message?

  3. #3
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    What part isn't working now, I didn't get it o_O.

    [php]Dim wc as new net.webclient

    Dim email as string = wc.downloadstring(url)

    msgbox(email)
    [/php]
    proper result?



  4. #4
    cosconub's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    in the programming section MPGH Cash: $90,000,000,000
    Posts
    372
    Reputation
    -4
    Thanks
    39
    My Mood
    Psychedelic
    let me see your source and error please

    A man is but the product of his thoughts what he thinks, he becomes.
    ~Mohandas Gandhi


    A Genius is nothing with out an idea, An idea is always an idea even without a genius.
    ~ Immortal

  5. #5
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Well, without any actual code provided, there's not a lot of things we can suggest. The most likely problem is that you're incorrectly downloading the string. Post your download method here so we can see if that's the problem, or PM me.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  6. #6
    o0OpurezO0o's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    behind you.
    Posts
    354
    Reputation
    10
    Thanks
    26
    My Mood
    Sick
    Send the code to jason, he is more helpful then cosconub. I vouch you send to jason. No offense cosconub

  7. #7
    Bombsaway707's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    Gym
    Posts
    8,799
    Reputation
    791
    Thanks
    4,004
    My Mood
    Amused
    Ok heres the source code:
    Code:
    Private Sub Emaillocation()
            Dim Target As String
            Target = "http:/**********/*****/Target.txt"
            Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(Target)
            Dim response As System.Net.HttpWebResponse = request.GetResponse()
            Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream(), System.Text.Encoding.GetEncoding("windows-1252"))
            Dim Targettxt As String
            Targettxt = sr.ReadToEnd()
            TargetX.Text = Targettxt
          Call email()
        End Sub
    
    Private Sub email()
            Dim AnEmailMessage As New MailMessage
            AnEmailMessage.From = New MailAddress("************@gmail.com")
            AnEmailMessage.To.Add(TargetX.Text) 'ERROR HERE
            AnEmailMessage.Subject = ("**************")
            AnEmailMessage.Body = ("*****************************")
            Dim SimpleSMTP As New SmtpClient("smtp.gmail.com")
            SimpleSMTP.Port = 587
            SimpleSMTP.EnableSsl = True
            SimpleSMTP.Credentials = New System.Net.NetworkCredential("**************@gmail.com", "******")
            SimpleSMTP.Send(AnEmailMessage)
        End Sub

    The error occurs when sending the email, i can get the entire error if need be but im very tired right now and am going to bed, will check in morning
    * = hidden for safety reasons
    Last edited by Bombsaway707; 01-02-2011 at 09:20 PM.

  8. #8
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Have you tried putting a breakpoint at that line and checking what value "targetX.Text" holds?

    Also, try changing which encoding you use when downloading. UTF8 is a pretty common one.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  9. #9
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Quote Originally Posted by Jason View Post
    Have you tried putting a breakpoint at that line and checking what value "targetX.Text" holds?

    Also, try changing which encoding you use when downloading. UTF8 is a pretty common one.
    Using UTF8 encoding shouldn't really do anything if the page only contains one email address or so...



  10. #10
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by Blubb1337 View Post
    Using UTF8 encoding shouldn't really do anything if the page only contains one email address or so...
    Im not concerned about UTF8 solving his problems, it's just I'm not too savvy with:

    Code:
    System.Text.Encoding.GetEncoding("windows-1252")
    It probably isn't the problem, but using a predefined encoding set would make things a bit more controlled til the error IS found.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  11. #11
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    1st there's no point of redefining encoding unless you know what exactly the encoding is used, plus I don't think there's a problem with encoding.

    I think there's some null character or something like whitespaces in the Target file. Happened to my once. Try trimming it manually or via VB:

    [php]Sub Emaillocation()
    Dim Target As String
    Target = "http:/**********/*****/Target.txt"
    Dim wc as new net.webclient
    Dim ID as string = wc.downloadstring(Target)
    ID = ID.Trim
    TargetX.Text = ID
    End Sub[/php]Try it.
    Last edited by Hassan; 01-03-2011 at 09:06 AM.

  12. #12
    cosconub's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    in the programming section MPGH Cash: $90,000,000,000
    Posts
    372
    Reputation
    -4
    Thanks
    39
    My Mood
    Psychedelic
    did you inport net?

    and btw oO that really hurt me deep man,

    A man is but the product of his thoughts what he thinks, he becomes.
    ~Mohandas Gandhi


    A Genius is nothing with out an idea, An idea is always an idea even without a genius.
    ~ Immortal

  13. #13
    Web-Designer's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Arizona, USA
    Posts
    270
    Reputation
    11
    Thanks
    53
    My Mood
    Fine

    Cool

    Make a label, visible = false, make the text of the label remote (heres a link) then just set the email to label1.Text


    (Change the .txt online to the email that you want it to send it.)


    As simple as that, it would take 15 mins MAX
    Code:
    Looking for some project(s) to dedicate my time to! I know HTML, PHP, MySQL and JavaScript.
    
    
    - Message me if I can help you with something, all I want is some credit!

  14. #14
    Hawky1337's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    88
    Reputation
    11
    Thanks
    27
    My Mood
    Shocked
    Quote Originally Posted by Web-Designer View Post
    Make a label, visible = false, make the text of the label remote (heres a link) then just set the email to label1.Text


    (Change the .txt online to the email that you want it to send it.)


    As simple as that, it would take 15 mins MAX
    Ever heard about variables? Lol.

  15. #15
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Hmmm, if error message is on sending, then try SMTP port 465


     


     


     



    The Most complete application MPGH will ever offer - 68%




Page 1 of 2 12 LastLast