mirror of
https://github.com/narkoz/hacker-scripts
synced 2025-08-23 19:07:33 +00:00
commit
f8478c42a4
44
java/Hangover.java
Normal file
44
java/Hangover.java
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import com.twilio.sdk.TwilioRestClient;
|
||||||
|
import com.twilio.sdk.TwilioRestException;
|
||||||
|
import com.twilio.sdk.resource.factory.MessageFactory;
|
||||||
|
import com.twilio.sdk.resource.instance.Message;
|
||||||
|
import org.apache.http.NameValuePair;
|
||||||
|
import org.apache.http.message.BasicNameValuePair;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
public class Hangover {
|
||||||
|
|
||||||
|
public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
|
||||||
|
public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");
|
||||||
|
|
||||||
|
public static final String YOUR_NUMBER = "1231231231";
|
||||||
|
public static final String BOSS_NUMBER = "3213213213";
|
||||||
|
|
||||||
|
public static void main(String[] args) throws TwilioRestException {
|
||||||
|
|
||||||
|
TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);
|
||||||
|
|
||||||
|
String[] randomMessages = {
|
||||||
|
"Locked out",
|
||||||
|
"Pipes broke",
|
||||||
|
"Food poisoning",
|
||||||
|
"Not feeling well"
|
||||||
|
};
|
||||||
|
|
||||||
|
int randomIndex = new Random().nextInt(randomMessages.length);
|
||||||
|
String finalMessage = (randomMessages[randomIndex]);
|
||||||
|
|
||||||
|
List<NameValuePair> params = new ArrayList<NameValuePair>();
|
||||||
|
params.add(new BasicNameValuePair("Body", "Gonna work from home. " + finalMessage));
|
||||||
|
params.add(new BasicNameValuePair("From", YOUR_NUMBER));
|
||||||
|
params.add(new BasicNameValuePair("To", BOSS_NUMBER));
|
||||||
|
|
||||||
|
MessageFactory messageFactory = client.getAccount().getMessageFactory();
|
||||||
|
Message message = messageFactory.create(params);
|
||||||
|
System.out.println(message.getSid());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
43
java/SmackMyBitch.java
Normal file
43
java/SmackMyBitch.java
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
import com.twilio.sdk.TwilioRestClient;
|
||||||
|
import com.twilio.sdk.TwilioRestException;
|
||||||
|
import com.twilio.sdk.resource.factory.MessageFactory;
|
||||||
|
import com.twilio.sdk.resource.instance.Message;
|
||||||
|
import org.apache.http.NameValuePair;
|
||||||
|
import org.apache.http.message.BasicNameValuePair;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
|
||||||
|
public class SmackMyBitch {
|
||||||
|
|
||||||
|
public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
|
||||||
|
public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");
|
||||||
|
|
||||||
|
public static final String YOUR_NUMBER = "1231231231";
|
||||||
|
public static final String HER_NUMBER = "3213213213";
|
||||||
|
|
||||||
|
public static void main(String[] args) throws TwilioRestException {
|
||||||
|
|
||||||
|
TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);
|
||||||
|
|
||||||
|
String[] randomMessages = {
|
||||||
|
"Working hard",
|
||||||
|
"Gotta ship this feature",
|
||||||
|
"Someone fucked the system again",
|
||||||
|
};
|
||||||
|
|
||||||
|
int randomIndex = new Random().nextInt(randomMessages.length);
|
||||||
|
String finalMessage = (randomMessages[randomIndex]);
|
||||||
|
|
||||||
|
List<NameValuePair> params = new ArrayList<NameValuePair>();
|
||||||
|
params.add(new BasicNameValuePair("Body", "Late at work. " + finalMessage));
|
||||||
|
params.add(new BasicNameValuePair("From", YOUR_NUMBER));
|
||||||
|
params.add(new BasicNameValuePair("To", HER_NUMBER));
|
||||||
|
|
||||||
|
MessageFactory messageFactory = client.getAccount().getMessageFactory();
|
||||||
|
Message message = messageFactory.create(params);
|
||||||
|
System.out.println(message.getSid());
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user